Skip to content

test_posix.test_makedev fails on Musl systems #138707

@kraj

Description

@kraj

Bug report

Bug description:

This test depends on platform C library defining NODEV which is there on glibc but not on musl C library implementation on Linux. This is introduced with

#31794

Alpine has disabled portions of above patch to get it going on musl by applying this patch

diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py
index 7ed45ac..a35c6db 100644
--- a/Lib/test/test_posix.py
+++ b/Lib/test/test_posix.py
@@ -724,7 +724,7 @@ def test_makedev(self):
             self.assertRaises((ValueError, OverflowError), posix.makedev, x, minor)
             self.assertRaises((ValueError, OverflowError), posix.makedev, major, x)

-        if sys.platform == 'linux':
+        if False:
             NODEV = -1
             self.assertEqual(posix.major(NODEV), NODEV)
             self.assertEqual(posix.minor(NODEV), NODEV)

CPython versions tested on:

3.13

Operating systems tested on:

Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS-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