[Python-checkins] r80108 - in python/branches/py3k: Lib/test/test_os.py Modules/posixmodule.c
victor.stinner
python-checkins at python.org
Fri Apr 16 14:23:43 CEST 2010
Author: victor.stinner
Date: Fri Apr 16 14:23:43 2010
New Revision: 80108
Log:
Add CS_GNU_LIBC_VERSION and CS_GNU_LIBPTHREAD_VERSION constants for constr(),
and disable test_execvpe_with_bad_program() of test_os if the libc uses
linuxthreads to avoid the "unknown signal 32" bug (see issue #4970).
Modified:
python/branches/py3k/Lib/test/test_os.py
python/branches/py3k/Modules/posixmodule.c
Modified: python/branches/py3k/Lib/test/test_os.py
==============================================================================
--- python/branches/py3k/Lib/test/test_os.py (original)
+++ python/branches/py3k/Lib/test/test_os.py Fri Apr 16 14:23:43 2010
@@ -589,6 +589,15 @@
class ExecTests(unittest.TestCase):
def test_execvpe_with_bad_program(self):
+ try:
+ # 'linuxthreads-0.10' or 'NPTL 2.10.2'
+ pthread = os.confstr("CS_GNU_LIBPTHREAD_VERSION")
+ linuxthreads = pthread.startswith("linuxthreads")
+ except ValueError:
+ linuxthreads = False
+ if linuxthreads:
+ raise unittest.SkipTest(
+ "avoid linuxthreads bug: see issue #4970")
self.assertRaises(OSError, os.execvpe, 'no such app-', ['no such app-'], None)
def test_execvpe_with_bad_arglist(self):
Modified: python/branches/py3k/Modules/posixmodule.c
==============================================================================
--- python/branches/py3k/Modules/posixmodule.c (original)
+++ python/branches/py3k/Modules/posixmodule.c Fri Apr 16 14:23:43 2010
@@ -6127,6 +6127,12 @@
#ifdef _MIPS_CS_VENDOR
{"MIPS_CS_VENDOR", _MIPS_CS_VENDOR},
#endif
+#ifdef _CS_GNU_LIBC_VERSION
+ {"CS_GNU_LIBC_VERSION", _CS_GNU_LIBC_VERSION},
+#endif
+#ifdef _CS_GNU_LIBPTHREAD_VERSION
+ {"CS_GNU_LIBPTHREAD_VERSION", _CS_GNU_LIBPTHREAD_VERSION},
+#endif
};
static int
More information about the Python-checkins
mailing list