diff options
| author | Khem Raj <raj.khem@gmail.com> | 2025-09-09 12:49:52 -0700 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-09-11 11:31:55 +0100 |
| commit | b499241d85eddc4a0790e6ba7f273a264ac6aa52 (patch) | |
| tree | 346ce28350045db529851264406c04dbfb417ce8 /meta/recipes-devtools/python | |
| parent | 3e07b2e32352cf3eb036365b30a5e45f8cd1a1ad (diff) | |
| download | poky-b499241d85eddc4a0790e6ba7f273a264ac6aa52.tar.gz | |
python: Skip NODEV portion of test_makedev when linked to musl
backport the upstreamed patch which is available in 3.14+
(From OE-Core rev: 46e0b41cc78d77900286c198da81159e63c2cb63)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/python')
3 files changed, 25 insertions, 19 deletions
diff --git a/meta/recipes-devtools/python/python3/0001-gh-90548-Skip-NODEV-portion-of-test_makedev-when-lin.patch b/meta/recipes-devtools/python/python3/0001-gh-90548-Skip-NODEV-portion-of-test_makedev-when-lin.patch new file mode 100644 index 0000000000..4390e086d0 --- /dev/null +++ b/meta/recipes-devtools/python/python3/0001-gh-90548-Skip-NODEV-portion-of-test_makedev-when-lin.patch | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | From 2dc5e9f4c82888dbe21bd1eadb4b59b0efa9608c Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Zachary Ware <zach@python.org> | ||
| 3 | Date: Sat, 6 Sep 2025 13:20:12 -0500 | ||
| 4 | Subject: [PATCH] gh-90548: Skip NODEV portion of test_makedev when linked to musl | ||
| 5 | |||
| 6 | Upstream-Status: Backport [https://github.com/python/cpython/pull/138593] | ||
| 7 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 8 | --- | ||
| 9 | Lib/test/test_posix.py | 2 +- | ||
| 10 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 11 | |||
| 12 | diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py | ||
| 13 | index c9cbe15..bfc1e2b 100644 | ||
| 14 | --- a/Lib/test/test_posix.py | ||
| 15 | +++ b/Lib/test/test_posix.py | ||
| 16 | @@ -757,7 +757,7 @@ class PosixTester(unittest.TestCase): | ||
| 17 | self.assertRaises((ValueError, OverflowError), posix.makedev, x, minor) | ||
| 18 | self.assertRaises((ValueError, OverflowError), posix.makedev, major, x) | ||
| 19 | |||
| 20 | - if sys.platform == 'linux': | ||
| 21 | + if sys.platform == 'linux' and not support.linked_to_musl(): | ||
| 22 | NODEV = -1 | ||
| 23 | self.assertEqual(posix.major(NODEV), NODEV) | ||
| 24 | self.assertEqual(posix.minor(NODEV), NODEV) | ||
diff --git a/meta/recipes-devtools/python/python3/test_posix_nodev_disable.patch b/meta/recipes-devtools/python/python3/test_posix_nodev_disable.patch deleted file mode 100644 index 85767e1e89..0000000000 --- a/meta/recipes-devtools/python/python3/test_posix_nodev_disable.patch +++ /dev/null | |||
| @@ -1,16 +0,0 @@ | |||
| 1 | Disable part of test_posix.test_makedev that depends on the NODEV | ||
| 2 | macro being defined (missing on musl). | ||
| 3 | |||
| 4 | Upstream-Status: Submitted [https://github.com/python/cpython/pull/31794] | ||
| 5 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 6 | --- a/Lib/test/test_posix.py | ||
| 7 | +++ b/Lib/test/test_posix.py | ||
| 8 | @@ -757,7 +757,7 @@ class PosixTester(unittest.TestCase): | ||
| 9 | self.assertRaises((ValueError, OverflowError), posix.makedev, x, minor) | ||
| 10 | self.assertRaises((ValueError, OverflowError), posix.makedev, major, x) | ||
| 11 | |||
| 12 | - if sys.platform == 'linux': | ||
| 13 | + if False: | ||
| 14 | NODEV = -1 | ||
| 15 | self.assertEqual(posix.major(NODEV), NODEV) | ||
| 16 | self.assertEqual(posix.minor(NODEV), NODEV) | ||
diff --git a/meta/recipes-devtools/python/python3_3.13.7.bb b/meta/recipes-devtools/python/python3_3.13.7.bb index a42b2c2a2d..c682f1288e 100644 --- a/meta/recipes-devtools/python/python3_3.13.7.bb +++ b/meta/recipes-devtools/python/python3_3.13.7.bb | |||
| @@ -30,9 +30,7 @@ SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \ | |||
| 30 | file://0001-test_active_children-skip-problematic-test.patch \ | 30 | file://0001-test_active_children-skip-problematic-test.patch \ |
| 31 | file://0001-test_readline-skip-limited-history-test.patch \ | 31 | file://0001-test_readline-skip-limited-history-test.patch \ |
| 32 | file://0001-Generate-data-for-OpenSSL-3.4-and-add-it-to-multissl.patch \ | 32 | file://0001-Generate-data-for-OpenSSL-3.4-and-add-it-to-multissl.patch \ |
| 33 | " | 33 | file://0001-gh-90548-Skip-NODEV-portion-of-test_makedev-when-lin.patch \ |
| 34 | SRC_URI:append:libc-musl = "\ | ||
| 35 | file://test_posix_nodev_disable.patch \ | ||
| 36 | " | 34 | " |
| 37 | SRC_URI:append:class-native = " \ | 35 | SRC_URI:append:class-native = " \ |
| 38 | file://0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch \ | 36 | file://0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch \ |
