]> granicus.if.org Git - python/commitdiff
bpo-31044: Skip test_posix.test_makedev() on FreeBSD (#2915)
authorVictor Stinner <victor.stinner@gmail.com>
Thu, 27 Jul 2017 14:55:54 +0000 (16:55 +0200)
committerGitHub <noreply@github.com>
Thu, 27 Jul 2017 14:55:54 +0000 (16:55 +0200)
There is a bug in FreeBSD CURRENT with 64-bit dev_t. Skip the test if
dev_t is larger than 32-bit, until the bug is fixed in FreeBSD
CURRENT.

Lib/test/test_posix.py

index 22b050d4d723c81c630078009dc92a4d5c04fd67..148c0641a999d550a7823fde1fa8db9990bedccd 100644 (file)
@@ -540,6 +540,10 @@ class PosixTester(unittest.TestCase):
         self.assertRaises(TypeError, posix.minor)
         self.assertRaises((ValueError, OverflowError), posix.minor, -1)
 
+        if sys.platform.startswith('freebsd') and dev >= 0x1_0000_0000:
+            self.skipTest("bpo-31044: on FreeBSD CURRENT, minor() truncates "
+                          "64-bit dev to 32-bit")
+
         self.assertEqual(posix.makedev(major, minor), dev)
         self.assertRaises(TypeError, posix.makedev, float(major), minor)
         self.assertRaises(TypeError, posix.makedev, major, float(minor))