You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
subprocess unit tests for kill, term and send_signal flaky #47026
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:
assignee='https://github.com/tiran'closed_at=<Date2010-03-08.14:26:06.823>created_at=<Date2008-05-06.23:40:54.777>labels= ['type-bug', 'tests']
title='subprocess unit tests for kill, term and send_signal flaky'updated_at=<Date2010-03-08.14:26:06.821>user='https://github.com/tiran'
The unit tests for the kill, term and send_signal methods of the
subprocess.Popen object are still flaky and sometimes cause the test
suite to hang. I'm going to disable them for the upcoming alpha until
I've found a better solution.
I re-enabled the tests a few days ago and haven't seen any issues on
Windows or Linux. I attached a patch against r76222 which enables the
kill, term, and send_signal tests again, and also did some clean-up and
updating to the way tests are skipped.
I also changed the assertNotEqual at the end of the kill, term, and
send_signal tests to check against None instead of 0. I *think* it
should be checking against None there to make sure that the subprocess
isn't live anymore (where None would mean that it is).
Let me know what you think and if this needs anything else.
Activity
tiran commentedon May 6, 2008
The unit tests for the kill, term and send_signal methods of the
subprocess.Popen object are still flaky and sometimes cause the test
suite to hang. I'm going to disable them for the upcoming alpha until
I've found a better solution.
benjaminp commentedon Jul 28, 2008
What's the status of this?
briancurtin commentedon Nov 12, 2009
I re-enabled the tests a few days ago and haven't seen any issues on
Windows or Linux. I attached a patch against r76222 which enables the
kill, term, and send_signal tests again, and also did some clean-up and
updating to the way tests are skipped.
I also changed the assertNotEqual at the end of the kill, term, and
send_signal tests to check against None instead of 0. I *think* it
should be checking against None there to make sure that the subprocess
isn't live anymore (where None would mean that it is).
Let me know what you think and if this needs anything else.
briancurtin commentedon Jan 7, 2010
Minor patch change
florentx commentedon Feb 8, 2010
The patch looks fine.
+1 to enable on trunk and follow the buildbots' behavior.
florentx commentedon Feb 27, 2010
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.
florentx commentedon Feb 27, 2010
Cleanup patch applied on r78508.
I will probably try to enable the tests on trunk.
florentx commentedon Mar 4, 2010
I experienced this hang with Linux AMD64.
It occurs in test_send_signal.
It is because signal.SIGINT is not always handled (see bpo-3137).
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.
florentx commentedon Mar 4, 2010
Re-enabled on r78662 and r78663.
Buildbots seems happy, except Windows XP + Cygwin buildbot:
======================================================================
FAIL: test_kill (test.test_subprocess.Win32ProcessTestCase)
----------------------------------------------------------------------
======================================================================
FAIL: test_send_signal (test.test_subprocess.Win32ProcessTestCase)
----------------------------------------------------------------------
======================================================================
FAIL: test_terminate (test.test_subprocess.Win32ProcessTestCase)
----------------------------------------------------------------------
florentx commentedon Mar 4, 2010
...and it hangs somewhere on ia64 Ubuntu.
http://www.python.org/dev/buildbot/all/builders/ia64%20Ubuntu%203.x/builds/557
florentx commentedon Mar 8, 2010
All this flakiness is fixed:
Note: because of bpo-3137, the send_signal(SIGINT) is retried 2 times on some platforms.