Commit a3136079 authored by Jason Madden's avatar Jason Madden

A more targeted disabling of certain tests under PyPy+subprocess, with explanations.

parent 46fc7fce
......@@ -12,28 +12,6 @@ else:
test_filename = sys.argv[1]
del sys.argv[1]
if hasattr(sys, 'pypy_version_info') and sys.pypy_version_info[:3] < (2, 6, 0):
# PyPy 2.5.0 has issues running these tests if subprocess is
# patched due to different parameter lists; later versions,
# specifically 2.6.0 on OS X, have not been shown to have these issues.
# Travis CI uses 2.5.0 at this writing.
# Example issue:
# ======================================================================
# ERROR: test_preexec_errpipe_does_not_double_close_pipes (__main__.POSIXProcessTestCase)
# Issue16140: Don't double close pipes on preexec error.
# ----------------------------------------------------------------------
# Traceback (most recent call last):
# File "test_subprocess.py", line 860, in test_preexec_errpipe_does_not_double_close_pipes
# stderr=subprocess.PIPE, preexec_fn=raise_it)
# File "test_subprocess.py", line 819, in __init__
# subprocess.Popen.__init__(self, *args, **kwargs)
# File "/home/travis/build/gevent/gevent/gevent/subprocess.py", line 243, in __init__
# errread, errwrite)
# TypeError: _execute_child() takes exactly 18 arguments (17 given)
if test_filename in ('test_signal.py', 'test_subprocess.py'):
kwargs['subprocess'] = False
print('Running with patch_all(%s): %s' % (','.join('%s=%r' % x for x in kwargs.items()), test_filename))
from gevent import monkey; monkey.patch_all(**kwargs)
......
......@@ -167,6 +167,25 @@ if sys.platform == 'darwin':
# causes Mac OS X to show "Python crashes" dialog box which is annoying
]
if hasattr(sys, 'pypy_version_info'):
disabled_tests += [
'test_subprocess.POSIXProcessTestCase.test_terminate_dead',
'test_subprocess.POSIXProcessTestCase.test_send_signal_dead',
'test_subprocess.POSIXProcessTestCase.test_kill_dead',
# Don't exist in the CPython test suite; with our monkey patch in place,
# they fail because the process they're looking for has been allowed to exit.
# Our monkey patch waits for the process with a watcher and so detects
# the exit before the normal polling mechanism would
'test_subprocess.POSIXProcessTestCase.test_preexec_errpipe_does_not_double_close_pipes',
# Does not exist in the CPython test suite. Subclasses Popen, and overrides
# _execute_child. But our version has a different parameter list than the
# version that comes with PyPy, so fails with a TypeError.
'test_signal.InterProcessSignalTests.test_main',
# Fails to get the signal to the correct handler due to
# https://bitbucket.org/cffi/cffi/issue/152/handling-errors-from-signal-handlers-in
]
# if 'signalfd' in os.environ.get('GEVENT_BACKEND', ''):
# # tests that don't interact well with signalfd
......
......@@ -76,6 +76,7 @@ if PYPY:
# check_sendall_interrupted and testInterruptedTimeout fail due to
# https://bitbucket.org/cffi/cffi/issue/152/handling-errors-from-signal-handlers-in
# See also patched_tests_setup and 'test_signal.InterProcessSignalTests.test_main'
'test_socket.py',
]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment