[pypy-issue] [issue1029] cpython test_subprocess.py fails

Garen Parham tracker at bugs.pypy.org
Mon Jan 30 03:09:30 CET 2012


New submission from Garen Parham <garen.p at gmail.com>:

On Ubuntu Linux 11.10, pypy trunk currently fails one of the modified 
test_subproces.py unit tests like so:

garen at ubuntu:~/dev/bins$ ~/dev/bins/pypy-c-jit-51842-457e2166648c-linux/bin/pypy 
~/dev/bins//pypy-c-jit-51842-457e2166648c-linux/lib-python/modified-
2.7/test/test_subprocess.py
...
======================================================================
FAIL: test_executable_without_cwd (__main__.ProcessTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/garen/dev/bins//pypy-c-jit-51842-457e2166648c-linux/lib-
python/modified-2.7/test/test_subprocess.py", line 163, in 
test_executable_without_cwd
    self.assertEqual(p.returncode, 47)
AssertionError: 1 != 47

======================================================================
FAIL: test_executable_without_cwd (__main__.ProcessTestCaseNoPoll)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/garen/dev/bins//pypy-c-jit-51842-457e2166648c-linux/lib-
python/modified-2.7/test/test_subprocess.py", line 163, in 
test_executable_without_cwd
    self.assertEqual(p.returncode, 47)
AssertionError: 1 != 47

Also, the test_subprocess.py shipped with the latest cpython 2.7.2.5 has several 
new tests that also fail:

======================================================================
ERROR: test_communicate_epipe_only_stdin (__main__.ProcessTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./Python-2.7.2/Lib/test/test_subprocess.py", line 617, in 
test_communicate_epipe_only_stdin
    p.communicate("x" * 2**20)
  File "/home/garen/dev/bins/pypy-c-jit-51842-457e2166648c-linux/lib-
python/modified-2.7/subprocess.py", line 729, in communicate
    self.stdin.write(input)
IOError: [Errno 32] Broken pipe: '<fdopen>'

======================================================================
ERROR: test_close_fd_0 (__main__.POSIXProcessTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./Python-2.7.2/Lib/test/test_subprocess.py", line 830, in 
test_close_fd_0
    self.check_close_std_fds([0])
  File "./Python-2.7.2/Lib/test/test_subprocess.py", line 821, in 
check_close_std_fds
    err = test_support.strip_python_stderr(err)
AttributeError: 'module' object has no attribute 'strip_python_stderr'

======================================================================
ERROR: test_close_fd_1 (__main__.POSIXProcessTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./Python-2.7.2/Lib/test/test_subprocess.py", line 833, in 
test_close_fd_1
    self.check_close_std_fds([1])
  File "./Python-2.7.2/Lib/test/test_subprocess.py", line 821, in 
check_close_std_fds
    err = test_support.strip_python_stderr(err)
AttributeError: 'module' object has no attribute 'strip_python_stderr'

======================================================================
ERROR: test_close_fd_2 (__main__.POSIXProcessTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./Python-2.7.2/Lib/test/test_subprocess.py", line 836, in 
test_close_fd_2
    self.check_close_std_fds([2])
  File "./Python-2.7.2/Lib/test/test_subprocess.py", line 821, in 
check_close_std_fds
    err = test_support.strip_python_stderr(err)
AttributeError: 'module' object has no attribute 'strip_python_stderr'

======================================================================
ERROR: test_close_fds_0_1 (__main__.POSIXProcessTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./Python-2.7.2/Lib/test/test_subprocess.py", line 839, in 
test_close_fds_0_1
    self.check_close_std_fds([0, 1])
  File "./Python-2.7.2/Lib/test/test_subprocess.py", line 821, in 
check_close_std_fds
    err = test_support.strip_python_stderr(err)
AttributeError: 'module' object has no attribute 'strip_python_stderr'

======================================================================
ERROR: test_close_fds_0_1_2 (__main__.POSIXProcessTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./Python-2.7.2/Lib/test/test_subprocess.py", line 850, in 
test_close_fds_0_1_2
    self.check_close_std_fds([0, 1, 2])
  File "./Python-2.7.2/Lib/test/test_subprocess.py", line 821, in 
check_close_std_fds
    err = test_support.strip_python_stderr(err)
AttributeError: 'module' object has no attribute 'strip_python_stderr'

======================================================================
ERROR: test_close_fds_0_2 (__main__.POSIXProcessTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./Python-2.7.2/Lib/test/test_subprocess.py", line 842, in 
test_close_fds_0_2
    self.check_close_std_fds([0, 2])
  File "./Python-2.7.2/Lib/test/test_subprocess.py", line 821, in 
check_close_std_fds
    err = test_support.strip_python_stderr(err)
AttributeError: 'module' object has no attribute 'strip_python_stderr'

======================================================================
ERROR: test_close_fds_1_2 (__main__.POSIXProcessTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./Python-2.7.2/Lib/test/test_subprocess.py", line 845, in 
test_close_fds_1_2
    self.check_close_std_fds([1, 2])
  File "./Python-2.7.2/Lib/test/test_subprocess.py", line 821, in 
check_close_std_fds
    err = test_support.strip_python_stderr(err)
AttributeError: 'module' object has no attribute 'strip_python_stderr'

======================================================================
ERROR: test_communicate_epipe (__main__.ProcessTestCaseNoPoll)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./Python-2.7.2/Lib/test/test_subprocess.py", line 609, in 
test_communicate_epipe
    p.communicate("x" * 2**20)
  File "/home/garen/dev/bins/pypy-c-jit-51842-457e2166648c-linux/lib-
python/modified-2.7/subprocess.py", line 740, in communicate
    return self._communicate(input)
  File "/home/garen/dev/bins/pypy-c-jit-51842-457e2166648c-linux/lib-
python/modified-2.7/subprocess.py", line 1263, in _communicate
    stdout, stderr = self._communicate_with_select(input)
  File "/home/garen/dev/bins/pypy-c-jit-51842-457e2166648c-linux/lib-
python/modified-2.7/subprocess.py", line 1365, in _communicate_with_select
    bytes_written = os.write(self.stdin.fileno(), chunk)
OSError: [Errno 32] Broken pipe

======================================================================
ERROR: test_communicate_epipe_only_stdin (__main__.ProcessTestCaseNoPoll)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./Python-2.7.2/Lib/test/test_subprocess.py", line 617, in 
test_communicate_epipe_only_stdin
    p.communicate("x" * 2**20)
  File "/home/garen/dev/bins/pypy-c-jit-51842-457e2166648c-linux/lib-
python/modified-2.7/subprocess.py", line 729, in communicate
    self.stdin.write(input)
IOError: [Errno 32] Broken pipe: '<fdopen>'

======================================================================
FAIL: test_executable_without_cwd (__main__.ProcessTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./Python-2.7.2/Lib/test/test_subprocess.py", line 163, in 
test_executable_without_cwd
    self.assertEqual(p.returncode, 47)
AssertionError: 1 != 47

======================================================================
FAIL: test_wait_when_sigchild_ignored (__main__.POSIXProcessTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./Python-2.7.2/Lib/test/test_subprocess.py", line 860, in 
test_wait_when_sigchild_ignored
    " non-zero with this error:\n%s" % stderr)
AssertionError: sigchild_ignore.py exited non-zero with this error:
Traceback (most recent call last):
  File "app_main.py", line 51, in run_toplevel
  File "/home/garen/dev/bins/Python-
2.7.2/Lib/test/subprocessdata/sigchild_ignore.py", line 6, in <module>
    subprocess.Popen([sys.executable, '-c', 'print("albatross")']).wait()
  File "/home/garen/dev/bins/pypy-c-jit-51842-457e2166648c-linux/lib-
python/modified-2.7/subprocess.py", line 1247, in wait
    pid, sts = _eintr_retry_call(os.waitpid, self.pid, 0)
  File "/home/garen/dev/bins/pypy-c-jit-51842-457e2166648c-linux/lib-
python/modified-2.7/subprocess.py", line 471, in _eintr_retry_call
    return func(*args)
OSError: [Errno 10] No child processes


======================================================================
FAIL: test_executable_without_cwd (__main__.ProcessTestCaseNoPoll)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./Python-2.7.2/Lib/test/test_subprocess.py", line 163, in 
test_executable_without_cwd
    self.assertEqual(p.returncode, 47)
AssertionError: 1 != 47

----------------------------------------------------------------------
Ran 127 tests in 23.897s

FAILED (failures=3, errors=10, skipped=14)
Traceback (most recent call last):
  File "app_main.py", line 51, in run_toplevel
  File "./Python-2.7.2/Lib/test/test_subprocess.py", line 1053, in <module>
    test_main()
  File "./Python-2.7.2/Lib/test/test_subprocess.py", line 1049, in test_main
    test_support.run_unittest(*unit_tests)
  File "/home/garen/dev/bins/pypy-c-jit-51842-457e2166648c-linux/lib-
python/modified-2.7/test/test_support.py", line 1138, in run_unittest
    _run_suite(suite)
  File "/home/garen/dev/bins/pypy-c-jit-51842-457e2166648c-linux/lib-
python/modified-2.7/test/test_support.py", line 1092, in _run_suite
    raise TestFailed(err)
TestFailed: multiple errors occurred

At least a few of these appear to be related to some previously filed issues:
https://bugs.pypy.org/issue934
https://bugs.pypy.org/issue828

----------
messages: 3837
nosy: Garen, pypy-issue
priority: bug
release: ???
status: unread
title: cpython test_subprocess.py fails

________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1029>
________________________________________


More information about the pypy-issue mailing list