-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
bpo-43406: Fix test_signal.test_stress_modifying_handlers() #24815
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
Conversation
Fix a race condition of test_stress_modifying_handlers() of test_signal: only raise signals while we are in the catch_unraisable_exception() context manager.
@pitrou: Would you mind to review this fix? cc @pablogsal |
The first commit should fix the race condition:
I added a second commit which should fix another race condition:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, thanks for fixing this
I wasn't confident about the "ignored" change, so thanks for your reviews :-) I merged my PR. |
Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8. |
Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.9. |
GH-24816 is a backport of this pull request to the 3.8 branch. |
…-24815) Fix a race condition of test_stress_modifying_handlers() of test_signal: only raise signals while we are in the catch_unraisable_exception() context manager. Moreover, don't check if we received at least one signal if at least one signal got ignored. (cherry picked from commit 1fa17e8) Co-authored-by: Victor Stinner <[email protected]>
…-24815) Fix a race condition of test_stress_modifying_handlers() of test_signal: only raise signals while we are in the catch_unraisable_exception() context manager. Moreover, don't check if we received at least one signal if at least one signal got ignored. (cherry picked from commit 1fa17e8) Co-authored-by: Victor Stinner <[email protected]>
GH-24817 is a backport of this pull request to the 3.9 branch. |
Fix a race condition of test_stress_modifying_handlers() of test_signal: only raise signals while we are in the catch_unraisable_exception() context manager. Moreover, don't check if we received at least one signal if at least one signal got ignored. (cherry picked from commit 1fa17e8) Co-authored-by: Victor Stinner <[email protected]>
GH-24817) Fix a race condition of test_stress_modifying_handlers() of test_signal: only raise signals while we are in the catch_unraisable_exception() context manager. Moreover, don't check if we received at least one signal if at least one signal got ignored. (cherry picked from commit 1fa17e8) Co-authored-by: Victor Stinner <[email protected]> Co-authored-by: Victor Stinner <[email protected]>
Fix a race condition of test_stress_modifying_handlers() of
test_signal: only raise signals while we are in the
catch_unraisable_exception() context manager.
https://bugs.python.org/issue43406