Skip to content

Commit

Permalink
[2.7] bpo-31044: Skip test_posix.test_makedev() on FreeBSD (#2915) (#…
Browse files Browse the repository at this point in the history
…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 12953ff)

* Fix syntax for Python 2.7
  • Loading branch information
vstinner committed Jul 27, 2017
1 parent fd6736d commit c2f7fb6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Lib/test/test_posix.py
Expand Up @@ -287,6 +287,10 @@ def test_makedev(self):
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)
Expand Down

0 comments on commit c2f7fb6

Please sign in to comment.