Title: test_posix.test_makedev fails on Musl systems · Issue #138707 · python/cpython · GitHub
Open Graph Title: test_posix.test_makedev fails on Musl systems · Issue #138707 · python/cpython
X Title: test_posix.test_makedev fails on Musl systems · Issue #138707 · python/cpython
Description: 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 g...
Open Graph Description: 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 h...
X Description: 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 h...
Opengraph URL: https://github.com/python/cpython/issues/138707
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"test_posix.test_makedev fails on Musl systems","articleBody":"# Bug report\n\n### Bug description:\n\nThis 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 \n\nhttps://github.com/python/cpython/pull/31794\n\n[Alpine has disabled portions](https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/main/python3/test_posix-nodev-disable.patch) of above patch to get it going on musl by applying this patch\n\n```diff\ndiff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py\nindex 7ed45ac..a35c6db 100644\n--- a/Lib/test/test_posix.py\n+++ b/Lib/test/test_posix.py\n@@ -724,7 +724,7 @@ def test_makedev(self):\n self.assertRaises((ValueError, OverflowError), posix.makedev, x, minor)\n self.assertRaises((ValueError, OverflowError), posix.makedev, major, x)\n\n- if sys.platform == 'linux':\n+ if False:\n NODEV = -1\n self.assertEqual(posix.major(NODEV), NODEV)\n self.assertEqual(posix.minor(NODEV), NODEV)\n```\n\n### CPython versions tested on:\n\n3.13\n\n### Operating systems tested on:\n\nLinux","author":{"url":"https://github.com/kraj","@type":"Person","name":"kraj"},"datePublished":"2025-09-09T17:11:22.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/138707/cpython/issues/138707"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:916db452-e946-2bf7-d6fe-cae60e523758 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 92F8:311995:195AB29:20E6C19:696B2FEF |
| html-safe-nonce | c7d1d17ca0c3903fe4091d2576844e12c4517f93682e41368662a0ca4055123b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MkY4OjMxMTk5NToxOTVBQjI5OjIwRTZDMTk6Njk2QjJGRUYiLCJ2aXNpdG9yX2lkIjoiMzg4NDcxNjc5NzY1ODM0NTQ1NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 5477d2de7cb8abc07eaef41606396e9736004b5ea526887664c72ad17d026d69 |
| hovercard-subject-tag | issue:3399270626 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/138707/issue_layout |
| twitter:image | https://opengraph.githubassets.com/30143cdabba33819dc8778f607781336a39e80316c33852a6d6abf94fe112a10/python/cpython/issues/138707 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/30143cdabba33819dc8778f607781336a39e80316c33852a6d6abf94fe112a10/python/cpython/issues/138707 |
| og:image:alt | 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 h... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | kraj |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width