diff options
author | Richard Oudkerk <shibturn@gmail.com> | 2013-10-17 12:56:18 (GMT) |
---|---|---|
committer | Richard Oudkerk <shibturn@gmail.com> | 2013-10-17 12:56:18 (GMT) |
commit | 26f92680da305a4f3007c47e11cced893991ec70 (patch) | |
tree | b10d7750c96705fd8216cc33f9150c98890c7465 /Lib | |
parent | 86823a52fcaa56fdd913495d2e7a6e5c9b5c7781 (diff) | |
download | cpython-26f92680da305a4f3007c47e11cced893991ec70.zip cpython-26f92680da305a4f3007c47e11cced893991ec70.tar.gz cpython-26f92680da305a4f3007c47e11cced893991ec70.tar.bz2 |
Stop trying to use strace, but add a sleep before terminate().
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/_test_multiprocessing.py | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py index d2b9403..daf5319 100644 --- a/Lib/test/_test_multiprocessing.py +++ b/Lib/test/_test_multiprocessing.py @@ -300,12 +300,14 @@ class _TestProcess(BaseTestCase): self.assertTimingAlmostEqual(join.elapsed, 0.0) self.assertEqual(p.is_alive(), True) + # XXX maybe terminating too soon causes the problems on Gentoo... + time.sleep(1) + p.terminate() if hasattr(signal, 'alarm'): # On the Gentoo buildbot waitpid() often seems to block forever. - # We use alarm() to interrupt it if it blocks for too long, and - # then try to print a backtrace for the child process using gdb. + # We use alarm() to interrupt it if it blocks for too long. def handler(*args): raise RuntimeError('join took too long: %s' % p) old_handler = signal.signal(signal.SIGALRM, handler) @@ -315,12 +317,6 @@ class _TestProcess(BaseTestCase): signal.alarm(0) except RuntimeError: print('os.waitpid() =', os.waitpid(p.pid, os.WNOHANG)) - import subprocess - try: - subprocess.check_call(['strace', '-p', str(p.pid)], - timeout=10) - except subprocess.TimeoutExpired: - pass raise finally: signal.signal(signal.SIGALRM, old_handler) |