From: Charles-François Natali Date: Sun, 29 May 2011 18:46:27 +0000 (+0200) Subject: Skip test_pipe2 on Linux kernels older than 2.6.27. X-Git-Tag: v3.3.0a1~2183^2~55 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d92ccb1f75ad5852e280c90354e5f547db649418;p=thirdparty%2FPython%2Fcpython.git Skip test_pipe2 on Linux kernels older than 2.6.27. --- diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py index e9103cd88032..79e2d367b968 100644 --- a/Lib/test/test_posix.py +++ b/Lib/test/test_posix.py @@ -480,6 +480,10 @@ class PosixTester(unittest.TestCase): @unittest.skipUnless(hasattr(os, 'pipe2'), "test needs os.pipe2()") def test_pipe2(self): + version = support.linux_version() + if sys.platform == 'linux2' and version < (2, 6, 27): + self.skipTest("Linux kernel 2.6.27 or higher required, " + "not %s.%s.%s" % version) self.assertRaises(TypeError, os.pipe2, 'DEADBEEF') self.assertRaises(TypeError, os.pipe2, 0, 0)