Skip to content

test_makedev fails on DragonFly BSD #154443

Description

@serhiy-storchaka

Bug report

test_os.test_posix.PosixTester.test_makedev fails on DragonFly BSD:

FAIL: test_makedev (test.test_os.test_posix.PosixTester.test_makedev)
    self.assertEqual(posix.major(NODEV), NODEV)
AssertionError: 255 != 4294967295

major() and minor() have no special case for NODEV there, they just extract bit fields:

#define	major(x)	((int)(((u_int)(x) >> 8)&0xff)) /* major number */
#define	minor(x)	((int)((x)&0xffff00ff))         /* minor number */
>>> os.NODEV, os.major(os.NODEV), os.minor(os.NODEV), os.makedev(os.NODEV, os.NODEV)
(4294967295, 255, 4294902015, 4294967295)

DragonFly BSD was added to the list of platforms preserving NODEV in gh-138712, but it does not preserve it, so it should be removed from the list.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.15pre-release feature fixes, bugs and security fixes3.16new features, bugs and security fixesOS-unsupportedtestsTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or error

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions