From 1df5c3e618c5f2bcbdbe44f329039dfffc1cd79e Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Sat, 20 Aug 2011 11:59:48 -0400 Subject: [PATCH] work around test_subprocess failure seen in koji (patch 5) --- ...st-subprocess-with-nonreadable-path-dir.patch | 12 ++++++++++++ pypy.spec | 16 +++++++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch diff --git a/pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch b/pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch new file mode 100644 index 0000000..eb6f324 --- /dev/null +++ b/pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch @@ -0,0 +1,12 @@ +diff -up pypy-pypy-release-1.6/lib-python/2.7/test/test_subprocess.py.non-readable-path pypy-pypy-release-1.6/lib-python/2.7/test/test_subprocess.py +--- pypy-pypy-release-1.6/lib-python/2.7/test/test_subprocess.py.non-readable-path 2011-08-20 11:46:31.410646024 -0400 ++++ pypy-pypy-release-1.6/lib-python/2.7/test/test_subprocess.py 2011-08-20 11:46:39.421645476 -0400 +@@ -570,7 +570,7 @@ class ProcessTestCase(BaseTestCase): + for i in range(1024): + # Windows raises IOError. Others raise OSError. + with self.assertRaises(EnvironmentError) as c: +- subprocess.Popen(['nonexisting_i_hope'], ++ subprocess.Popen(['/usr/bin/nonexisting_i_hope'], + stdout=subprocess.PIPE, + stderr=subprocess.PIPE) + if c.exception.errno != errno.ENOENT: # ignore "no such file" diff --git a/pypy.spec b/pypy.spec index c3faabb..3280ff9 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.6 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -155,6 +155,16 @@ Patch3: pypy-1.4.1-add-LIBRARY_INSTALLATION_PATH.patch # support (rhbz#666963) Patch4: pypy-1.5-more-readable-c-code.patch +# In my koji builds, /root/bin is in the PATH for some reason +# This leads to test_subprocess.py failing, due to "test_leaking_fds_on_error" +# trying every dir in PATH for "nonexisting_i_hope", which leads to it raising +# OSError: [Errno 13] Permission denied +# when it tries to read /root/bin, rather than raising "No such file" +# +# Work around this by specifying an absolute path for the non-existant +# executable +# Not yet sent upstream +Patch5: pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch # Build-time requirements: @@ -318,6 +328,7 @@ sed -i \ %patch4 -p1 -b .more-readable-c-code +%patch5 -p1 # Replace /usr/local/bin/python shebangs with /usr/bin/python: find -name "*.py" -exec \ @@ -785,6 +796,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Sat Aug 20 2011 David Malcolm - 1.6-2 +- work around test_subprocess failure seen in koji (patch 5) + * Thu Aug 18 2011 David Malcolm - 1.6-1 - 1.6 - rewrite the %%check section, introducing per-test timeouts