8000 [3.12] gh-110647: Fix signal test_stress_modifying_handlers() (GH-110650) by miss-islington · Pull Request #110658 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

[3.12] gh-110647: Fix signal test_stress_modifying_handlers() (GH-110650) #110658

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Lib/test/test_signal.py
Original file line number Diff line number Diff line change
Expand Up @@ -1339,7 +1339,7 @@ def set_interrupts():
num_sent_signals += 1

def cycle_handlers():
while num_sent_signals < 100:
while num_sent_signals < 100 or num_received_signals < 1:
for i in range(20000):
# Cycle between a Python-defined and a non-Python handler
for handler in [custom_handler, signal.SIG_IGN]:
Expand Down Expand Up @@ -1372,7 +1372,7 @@ def cycle_handlers():
if not ignored:
# Sanity check that some signals were received, but not all
self.assertGreater(num_received_signals, 0)
self.assertLess(num_received_signals, num_sent_signals)
self.assertLessEqual(num_received_signals, num_sent_signals)
finally:
do_stop = True
t.join()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Fix test_stress_modifying_handlers() of test_signal. Patch by Victor
Stinner.
0