Commit c2f7fb61 authored by Victor Stinner's avatar Victor Stinner Committed by GitHub

[2.7] bpo-31044: Skip test_posix.test_makedev() on FreeBSD (#2915) (#2918)

* bpo-31044: Skip test_posix.test_makedev() on FreeBSD (#2915)

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.
(cherry picked from commit 12953ffe)

* Fix syntax for Python 2.7
parent fd6736d1
......@@ -287,6 +287,10 @@ class PosixTester(unittest.TestCase):
self.assertRaises(TypeError, posix.minor)
self.assertRaises((ValueError, OverflowError), posix.minor, -1)
if sys.platform.startswith('freebsd') and dev >= 0x100000000:
self.skipTest("bpo-31044: on FreeBSD CURRENT, minor() truncates "
"64-bit dev to 32-bit")
self.assertEqual(posix.makedev(major, minor), dev)
self.assertEqual(posix.makedev(int(major), int(minor)), dev)
self.assertEqual(posix.makedev(long(major), long(minor)), dev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment