From d92ccb1f75ad5852e280c90354e5f547db649418 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charles-Fran=C3=A7ois=20Natali?= Date: Sun, 29 May 2011 20:46:27 +0200 Subject: [PATCH] Skip test_pipe2 on Linux kernels older than 2.6.27. --- Lib/test/test_posix.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py index e9103cd8803..79e2d367b96 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)