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
subprocess unit tests for kill, term and send_signal flaky #47026
Comments
The unit tests for the kill, term and send_signal methods of the |
What's the status of this? |
I re-enabled the tests a few days ago and haven't seen any issues on I also changed the assertNotEqual at the end of the kill, term, and Let me know what you think and if this needs anything else. |
Minor patch change |
The patch looks fine. |
Patch based on Brian's patch, with additional cleanup, and use new unittest helpers: skipUnless, assertRaises. And create a custom helper assertStderrEqual instead of "remove_stderr_debug_decorations" for debug builds. |
Cleanup patch applied on r78508. |
I experienced this hang with Linux AMD64. It occurs in test_send_signal. As a workaround, there's 2 choices: add a delay between Popen and send_signal, or retry SIGINT 2 or 3 times. Windows should not be affected, because it uses signal SIGTERM in the test. |
Re-enabled on r78662 and r78663. ====================================================================== Traceback (most recent call last):
File "D:\cygwin\home\db3l\buildarea\trunk.bolen-windows\build\lib\test\test_subprocess.py", line 768, in test_kill
self.assertNotEqual(p.wait(), 0)
AssertionError: 0 == 0 ====================================================================== Traceback (most recent call last):
File "D:\cygwin\home\db3l\buildarea\trunk.bolen-windows\build\lib\test\test_subprocess.py", line 761, in test_send_signal
self.assertNotEqual(p.wait(), 0)
AssertionError: 0 == 0 ====================================================================== Traceback (most recent call last):
File "D:\cygwin\home\db3l\buildarea\trunk.bolen-windows\build\lib\test\test_subprocess.py", line 775, in test_terminate
self.assertNotEqual(p.wait(), 0)
AssertionError: 0 == 0 |
...and it hangs somewhere on ia64 Ubuntu. |
All this flakiness is fixed:
Note: because of bpo-3137, the send_signal(SIGINT) is retried 2 times on some platforms. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: