https://github.com/python/cpython/commit/2b8ff3ca66d8ed73dece0683e6192489c1ccf75c
commit: 2b8ff3ca66d8ed73dece0683e6192489c1ccf75c
branch: 3.13
author: Miss Islington (bot) <[email protected]>
committer: encukou <[email protected]>
date: 2025-09-16T10:27:19+02:00
summary:

[3.13] gh-138163: skip failures if tests are run with `SCHED_BATCH` on glibc 
(GH-138576) (GH-138819)

(cherry picked from commit 492941459acb5b5a104d96414288601d2e2b7e6f)


This backport omits SCHED_DEADLINE, which was added in 3.14.

---------

Co-authored-by: jxes993409 <[email protected]>
Co-authored-by: Petr Viktorin <[email protected]>

files:
M Lib/test/test_posix.py

diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py
index bfc1e2b251f6db..c327d2add2f1cd 100644
--- a/Lib/test/test_posix.py
+++ b/Lib/test/test_posix.py
@@ -1991,6 +1991,11 @@ def test_setscheduler_only_param(self):
     @requires_sched
     @unittest.skipIf(sys.platform.startswith(('freebsd', 'netbsd')),
                      "bpo-34685: test can fail on BSD")
+    @unittest.skipIf(platform.libc_ver()[0] == 'glibc' and
+                     os.sched_getscheduler(0) in [
+                        os.SCHED_BATCH,
+                        os.SCHED_IDLE],
+                     "Skip test due to glibc posix_spawn policy")
     def test_setscheduler_with_policy(self):
         policy = os.sched_getscheduler(0)
         priority = os.sched_get_priority_min(policy)

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to