python3: use SKIPPED_TESTS instead of test skip patches
PATCH 1/1 python3: use SKIPPED_TESTS instead of test skip patches
Drop all 13 patches carried for skipping various known ptest failures and replace them with usage of the SKIPPED_TESTS variable, which we have started doing in recent commits (e.g. 40b0815dc9). Most but not all of the test skips are due to load variability, distinguish between them by using multiple SKIPPED_TESTS:append blocks with comments taken from the patch files indicating their purpose. This adds 62 lines to the Python 3 recipe, but it also means that we no longer have to maintain the patch files across version upgrades, where they often break due to changes in the test modules upstream.
Results look the same as those from my last upgrade run:
|== Tests result: SUCCESS == | |28 tests skipped: | test.test_asyncio.test_windows_events | test.test_asyncio.test_windows_utils test.test_gdb.test_backtrace | test.test_gdb.test_cfunction test.test_gdb.test_cfunction_full | test.test_gdb.test_misc test.test_gdb.test_pretty_print | test_android test_apple test_asdl_parser test_clinic test_devpoll | test_free_threading test_generated_cases test_idle test_kqueue | test_launcher test_msvcrt test_startfile test_tcl test_tkinter | test_ttk test_ttk_textonly test_turtle test_winapi | test_winconsoleio test_winreg test_wmi | |9 tests skipped (resource denied): | test_curses test_peg_generator test_smtpnet test_socketserver | test_urllib2net test_urllibnet test_winsound test_xpickle | test_zipfile64 | |455 tests OK. | |Total duration: 3 min 9 sec |Total tests: run=47,012 (filtered) skipped=2,336 |Total test files: run=483/492 (filtered) skipped=28 resource_denied=9 |Result: SUCCESS |DURATION: 190 |END: /usr/lib/python3/ptest |2026-05-29T02:22 |STOP: ptest-runner |TOTAL: 1 FAIL: 0
--- ...sts-due-to-load-variability-on-YP-AB.patch | 79 ----------------- ...kip-flaky-test_default_timeout-tests.patch | 49 ----------- ..._fileno-test-due-to-load-variability.patch | 29 ------- ...ctive_children-skip-problematic-test.patch | 34 -------- ...1-test_cmd-skip-bang-completion-test.patch | 31 ------- ...pes.test_find-skip-without-tools-sdk.patch | 33 -------- ...-test_deadlock-skip-problematic-test.patch | 27 ------ ..._active_thread-skip-problematic-test.patch | 30 ------- ...-test_unix_console.test_cursor_back_.patch | 46 ---------- ...t_readline-skip-limited-history-test.patch | 46 ---------- ...-test_shutdown-skip-problematic-test.patch | 43 ---------- ...orlines-skip-due-to-load-variability.patch | 29 ------- ...kip-test_sysconfig.test_sysconfigdat.patch | 32 ------- .../recipes-devtools/python/python3_3.14.5.bb | 84 +++++++++++++++---- 14 files changed, 70 insertions(+), 522 deletions(-) delete mode 100644 meta/recipes-devtools/python/python3/0001-Skip-failing-tests-due-to-load-variability-on-YP-AB.patch delete mode 100644 meta/recipes-devtools/python/python3/0001-Skip-flaky-test_default_timeout-tests.patch delete mode 100644 meta/recipes-devtools/python/python3/0001-skip-no_stdout_fileno-test-due-to-load-variability.patch delete mode 100644 meta/recipes-devtools/python/python3/0001-test_active_children-skip-problematic-test.patch delete mode 100644 meta/recipes-devtools/python/python3/0001-test_cmd-skip-bang-completion-test.patch delete mode 100644 meta/recipes-devtools/python/python3/0001-test_ctypes.test_find-skip-without-tools-sdk.patch delete mode 100644 meta/recipes-devtools/python/python3/0001-test_deadlock-skip-problematic-test.patch delete mode 100644 meta/recipes-devtools/python/python3/0001-test_only_active_thread-skip-problematic-test.patch delete mode 100644 meta/recipes-devtools/python/python3/0001-test_pyrepl-skip-test_unix_console.test_cursor_back_.patch delete mode 100644 meta/recipes-devtools/python/python3/0001-test_readline-skip-limited-history-test.patch delete mode 100644 meta/recipes-devtools/python/python3/0001-test_shutdown-skip-problematic-test.patch delete mode 100644 meta/recipes-devtools/python/python3/0001-test_storlines-skip-due-to-load-variability.patch delete mode 100644 meta/recipes-devtools/python/python3/0001-test_sysconfig-skip-test_sysconfig.test_sysconfigdat.patch
meta/recipes-devtools/python/python3/0001-Skip-failing-tests-due-to-load-variability-on-YP-AB.patch deleted +0 -79
@@ -1,79 +0,0 @@ -From aa32aef19d3a54a25dc16b3b77e29e902ee8abd7 Mon Sep 17 00:00:00 2001 -From: Yi Fan Yu <[email protected]> -Date: Thu, 1 Apr 2021 13:08:37 -0700 -Subject: [PATCH] Skip failing tests due to load variability on YP AB - -Skip these tests until AB-INT is solved. - -[YOCTO #14296] - -Upstream-Status: Inappropriate [OE-Specific] - -Signed-off-by: Yi Fan Yu <[email protected]> - -Skip two additional tests due to suspected load variability failures. - -[YOCTO #15131] -[YOCTO #15177] - -Signed-off-by: Trevor Gamblin <[email protected]> - -Refresh to apply on top of Python 3.14.0. - -Signed-off-by: Trevor Gamblin <[email protected]> ---- - Lib/test/_test_multiprocessing.py | 3 +++ - Lib/test/test_time.py | 2 ++ - 2 files changed, 5 insertions(+) - -diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py -index 9a72362c022..008e6a505a5 100644 ---- a/Lib/test/_test_multiprocessing.py -+++ b/Lib/test/_test_multiprocessing.py -@@ -774,6 +774,7 @@ class _TestProcess(BaseTestCase): - close_queue(q) - - @support.requires_resource('walltime') -+ @unittest.skip('timing related test, dependent on load') - def test_many_processes(self): - if self.TYPE == 'threads': - self.skipTest('test not appropriate for {}'.format(self.TYPE)) -@@ -2398,6 +2399,7 @@ class _TestBarrier(BaseTestCase): - except threading.BrokenBarrierError: - results.append(True) - -+ @unittest.skip('timing related test, dependent on load') - def test_timeout(self): - """ - Test wait(timeout) -@@ -5550,6 +5552,7 @@ class TestWait(unittest.TestCase): - time.sleep(period) - - @support.requires_resource('walltime') -+ @unittest.skip('timing related test, dependent on load') - def test_wait_integer(self): - from multiprocessing.connection import wait - -diff --git a/Lib/test/test_time.py b/Lib/test/test_time.py -index 5312faa5077..36873d9a400 100644 ---- a/Lib/test/test_time.py -+++ b/Lib/test/test_time.py -@@ -548,6 +548,7 @@ class TimeTestCase(unittest.TestCase): - def test_perf_counter(self): - time.perf_counter() - -+ @unittest.skip('timing related test, dependent on load') - @unittest.skipIf( - support.is_wasi, "process_time not available on WASI" - ) -@@ -567,6 +568,7 @@ class TimeTestCase(unittest.TestCase): - self.assertTrue(info.monotonic) - self.assertFalse(info.adjustable) - -+ @unittest.skip('timing related test, dependent on load') - def test_thread_time(self): - if not hasattr(time, 'thread_time'): - if sys.platform.startswith(('linux', 'android', 'win')): --- -2.52.0 -
meta/recipes-devtools/python/python3/0001-Skip-flaky-test_default_timeout-tests.patch deleted +0 -49
49 lines not on this page · raw message
meta/recipes-devtools/python/python3/0001-skip-no_stdout_fileno-test-due-to-load-variability.patch deleted +0 -29
@@ -1,29 +0,0 @@ -From c5bdd39f8ebc4e6c58a47d7e424eac028eddb4ff Mon Sep 17 00:00:00 2001 -From: Trevor Gamblin <[email protected]> -Date: Fri, 15 Sep 2023 08:48:33 -0400 -Subject: [PATCH] skip no_stdout_fileno test due to load variability - -Skip test_input_no_stdout_fileno so that it doesn't fail on systems -under heavy load. - -Upstream-Status: Inappropriate [OE-Specific] - -[YOCTO #15210] - -Signed-off-by: Trevor Gamblin <[email protected]> ---- - Lib/test/test_builtin.py | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/Lib/test/test_builtin.py b/Lib/test/test_builtin.py -index c5394de..ed17fb6 100644 ---- a/Lib/test/test_builtin.py -+++ b/Lib/test/test_builtin.py -@@ -2738,6 +2738,7 @@ class PtyTests(unittest.TestCase): - "byte 0xe9 in position 4: ordinal not in " - "range(128)") - -+ @unittest.skip("Test may fail under heavy load") - def test_input_no_stdout_fileno(self): - # Issue #24402: If stdin is the original terminal but stdout.fileno() - # fails, do not use the original stdout file descriptor
meta/recipes-devtools/python/python3/0001-test_active_children-skip-problematic-test.patch deleted +0 -34
@@ -1,34 +0,0 @@ -From 9c9aac87f48eaece5b99ea347b639c21eea84e6d Mon Sep 17 00:00:00 2001 -From: Trevor Gamblin <[email protected]> -Date: Thu, 13 Jun 2024 10:54:31 -0400 -Subject: [PATCH] test_active_children: skip problematic test - -This test is failing in some tests on the Autobuilder. Since it's of a -similar nature to other failing/hanging tests, disable it for now. - -Upstream-Status: Inappropriate [OE-Specific] - -Signed-off-by: Trevor Gamblin <[email protected]> - -Refresh to apply on top of Python 3.14.0. - -Signed-off-by: Trevor Gamblin <[email protected]> ---- - Lib/test/_test_multiprocessing.py | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py -index 008e6a505a5..746de8945f0 100644 ---- a/Lib/test/_test_multiprocessing.py -+++ b/Lib/test/_test_multiprocessing.py -@@ -667,6 +667,7 @@ class _TestProcess(BaseTestCase): - self.assertIsInstance(cpus, int) - self.assertGreaterEqual(cpus, 1) - -+ @unittest.skip("skipping problematic test") - def test_active_children(self): - self.assertEqual(type(self.active_children()), list) - --- -2.51.0 -
meta/recipes-devtools/python/python3/0001-test_cmd-skip-bang-completion-test.patch deleted +0 -31
@@ -1,31 +0,0 @@ -From 614e3aefec85b51a611f85a55b6760f12e29b953 Mon Sep 17 00:00:00 2001 -From: Trevor Gamblin <[email protected]> -Date: Mon, 27 Oct 2025 09:52:46 -0400 -Subject: [PATCH] test_cmd: skip bang completion test - -We compile Python3 with editline support by default, which has tab completion -but not bang completion. If building with readline, -test_bang_completion_without_do_shell() passes. Skip the test because of this. - -Upstream-Status: Inappropriate [embedded-specific] - -Signed-off-by: Trevor Gamblin <[email protected]> ---- - Lib/test/test_cmd.py | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/Lib/test/test_cmd.py b/Lib/test/test_cmd.py -index dbfec42fc21..c33dab8d10d 100644 ---- a/Lib/test/test_cmd.py -+++ b/Lib/test/test_cmd.py -@@ -295,6 +295,7 @@ class CmdTestReadline(unittest.TestCase): - self.assertIn(b'ab_completion_test', output) - self.assertIn(b'tab completion success', output) - -+ @unittest.skip('no bang completion without readline') - def test_bang_completion_without_do_shell(self): - script = textwrap.dedent(""" - import cmd --- -2.51.0 -
meta/recipes-devtools/python/python3/0001-test_ctypes.test_find-skip-without-tools-sdk.patch deleted +0 -33
@@ -1,33 +0,0 @@ -From 0e9d0c58e77ef540d9601ce84a1aa79d9ce6ee9b Mon Sep 17 00:00:00 2001 -From: Tim Orling <[email protected]> -Date: Fri, 18 Jun 2021 11:56:50 -0700 -Subject: [PATCH] test_ctypes.test_find: skip without tools-sdk - -These tests need full packagegroup-core-buildessential, the -easiest way to dynamically check for that is looking for -'tools-sdk' in IMAGE_FEATURES. - -Upstream-Status: Inappropriate [oe-specific] - -Signed-off-by: Tim Orling <[email protected]> ---- - Lib/test/test_ctypes/test_find.py | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/Lib/test/test_ctypes/test_find.py b/Lib/test/test_ctypes/test_find.py -index 85b2861..b033203 100644 ---- a/Lib/test/test_ctypes/test_find.py -+++ b/Lib/test/test_ctypes/test_find.py -@@ -117,10 +117,12 @@ class FindLibraryLinux(unittest.TestCase): - # LD_LIBRARY_PATH) - self.assertEqual(find_library(libname), 'lib%s.so' % libname) - -+ @unittest.skip("Needs IMAGE_FEATURE += \"tools-sdk\"") - def test_find_library_with_gcc(self): - with unittest.mock.patch("ctypes.util._findSoname_ldconfig", lambda *args: None): - self.assertNotEqual(find_library('c'), None) - -+ @unittest.skip("Needs IMAGE_FEATURE += \"tools-sdk\"") - def test_find_library_with_ld(self): - with unittest.mock.patch("ctypes.util._findSoname_ldconfig", lambda *args: None), \ - unittest.mock.patch("ctypes.util._findLib_gcc", lambda *args: None):
meta/recipes-devtools/python/python3/0001-test_deadlock-skip-problematic-test.patch deleted +0 -27
@@ -1,27 +0,0 @@ -From 5a44f74549b32395109342e9299510c32db71068 Mon Sep 17 00:00:00 2001 -From: Trevor Gamblin <[email protected]> -Date: Wed, 12 Jun 2024 10:29:03 -0400 -Subject: [PATCH] test_deadlock: skip problematic test - -This test hangs frequently when run on the Autobuilder. Disable it in -testing until the cause can be determined. - -Upstream-Status: Inappropriate [OE-Specific] - -Signed-off-by: Trevor Gamblin <[email protected]> ---- - Lib/test/test_concurrent_futures/test_deadlock.py | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/Lib/test/test_concurrent_futures/test_deadlock.py b/Lib/test/test_concurrent_futures/test_deadlock.py -index 3c30c45..008d6c0 100644 ---- a/Lib/test/test_concurrent_futures/test_deadlock.py -+++ b/Lib/test/test_concurrent_futures/test_deadlock.py -@@ -90,6 +90,7 @@ class ErrorAtUnpickle(object): - return _raise_error_ignore_stderr, (UnpicklingError, ) - - [email protected]("skipping problematic test") - class ExecutorDeadlockTest: - TIMEOUT = support.LONG_TIMEOUT -
meta/recipes-devtools/python/python3/0001-test_only_active_thread-skip-problematic-test.patch deleted +0 -30
@@ -1,30 +0,0 @@ -From 0524821f8fcbdea2fbd90f199e7fb4950f50530f Mon Sep 17 00:00:00 2001 -From: Trevor Gamblin <[email protected]> -Date: Tue, 3 Mar 2026 09:27:10 -0500 -Subject: [PATCH] test_only_active_thread: skip problematic test - -This test hangs frequently when run on the Autobuilder. Disable it in -testing for now. - -Upstream-Status: Inappropriate [OE-Specific] - -Signed-off-by: Trevor Gamblin <[email protected]> ---- - Lib/test/test_external_inspection.py | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/Lib/test/test_external_inspection.py b/Lib/test/test_external_inspection.py -index a709b837161..7a87092c10e 100644 ---- a/Lib/test/test_external_inspection.py -+++ b/Lib/test/test_external_inspection.py -@@ -1154,6 +1154,7 @@ class TestGetStackTrace(unittest.TestCase): - ], - ) - -+ @unittest.skip("skipping problematic test") - @skip_if_not_supported - @unittest.skipIf( - sys.platform == "linux" and not PROCESS_VM_READV_SUPPORTED, --- -2.53.0 -
meta/recipes-devtools/python/python3/0001-test_pyrepl-skip-test_unix_console.test_cursor_back_.patch deleted +0 -46
46 lines not on this page · raw message
meta/recipes-devtools/python/python3/0001-test_readline-skip-limited-history-test.patch deleted +0 -46
46 lines not on this page · raw message
meta/recipes-devtools/python/python3/0001-test_shutdown-skip-problematic-test.patch deleted +0 -43
43 lines not on this page · raw message
meta/recipes-devtools/python/python3/0001-test_storlines-skip-due-to-load-variability.patch deleted +0 -29
@@ -1,29 +0,0 @@ -From 9f252a691cd335341938489da32d6e2d4620d8ca Mon Sep 17 00:00:00 2001 -From: Trevor Gamblin <[email protected]> -Date: Fri, 6 Oct 2023 10:59:44 -0400 -Subject: [PATCH] test_storlines: skip due to load variability - -This is yet another test that intermittently fails on the Yocto AB when -a worker is under heavy load, so skip it during testing. - -Upstream-Status: Inappropriate [OE-Specific] - -[YOCTO #14933] - -Signed-off-by: Trevor Gamblin <[email protected]> ---- - Lib/test/test_ftplib.py | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/Lib/test/test_ftplib.py b/Lib/test/test_ftplib.py -index bed0e6d..36602be 100644 ---- a/Lib/test/test_ftplib.py -+++ b/Lib/test/test_ftplib.py -@@ -630,6 +630,7 @@ class TestFTPClass(TestCase): - self.client.storbinary('stor', f, rest=r) - self.assertEqual(self.server.handler_instance.rest, str(r)) - -+ @unittest.skip('timing related test, dependent on load') - def test_storlines(self): - data = RETR_DATA.replace('\r\n', '\n').encode(self.client.encoding) - f = io.BytesIO(data)
meta/recipes-devtools/python/python3/0001-test_sysconfig-skip-test_sysconfig.test_sysconfigdat.patch deleted +0 -32
@@ -1,32 +0,0 @@ -From ac5635821ed9bead45a5bcddc3828e50647fbe77 Mon Sep 17 00:00:00 2001 -From: Trevor Gamblin <[email protected]> -Date: Mon, 27 Oct 2025 14:24:24 -0400 -Subject: [PATCH] test_sysconfig: skip test_sysconfig.test_sysconfigdata_json - -This test seems new as of 3.14.0 and fails due to various path and flag -differences in variables like CFLAGS. Since the test already has the -precedent of a skip put in place for Android builds due to prefix -changes, skip it for our situation too. - -Upstream-Status: Inappropriate [embedded-specific] - -Signed-off-by: Trevor Gamblin <[email protected]> ---- - Lib/test/test_sysconfig.py | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/Lib/test/test_sysconfig.py b/Lib/test/test_sysconfig.py -index 09eff11179e..14fcdedccba 100644 ---- a/Lib/test/test_sysconfig.py -+++ b/Lib/test/test_sysconfig.py -@@ -689,6 +689,7 @@ class TestSysConfig(unittest.TestCase, VirtualEnvironmentMixin): - self.assertNotEqual(data['prefix'], data['base_prefix']) - self.assertNotEqual(data['exec_prefix'], data['base_exec_prefix']) - -+ @unittest.skip('OE adds/modifies various flags and paths/prefixes') - @unittest.skipIf(os.name != 'posix', '_sysconfig-vars JSON file is only available on POSIX') - @unittest.skipIf(is_wasi, "_sysconfig-vars JSON file currently isn't available on WASI") - @unittest.skipIf(is_android or is_apple_mobile, 'Android and iOS change the prefix') --- -2.51.0 -
meta/recipes-devtools/python/python3_3.14.5.bb +70 -14
102 lines not on this page · raw message
Signature · 1 line
2.54.0