Skip to content

Commit 2b8ff3c

Browse files
miss-islingtonjxes993409encukou
authored
[3.13] pythongh-138163: skip failures if tests are run with SCHED_BATCH on glibc (pythonGH-138576) (pythonGH-138819)
(cherry picked from commit 4929414) This backport omits SCHED_DEADLINE, which was added in 3.14. --------- Co-authored-by: jxes993409 <[email protected]> Co-authored-by: Petr Viktorin <[email protected]>
1 parent 3669efb commit 2b8ff3c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Lib/test/test_posix.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1991,6 +1991,11 @@ def test_setscheduler_only_param(self):
19911991
@requires_sched
19921992
@unittest.skipIf(sys.platform.startswith(('freebsd', 'netbsd')),
19931993
"bpo-34685: test can fail on BSD")
1994+
@unittest.skipIf(platform.libc_ver()[0] == 'glibc' and
1995+
os.sched_getscheduler(0) in [
1996+
os.SCHED_BATCH,
1997+
os.SCHED_IDLE],
1998+
"Skip test due to glibc posix_spawn policy")
19941999
def test_setscheduler_with_policy(self):
19952000
policy = os.sched_getscheduler(0)
19962001
priority = os.sched_get_priority_min(policy)

0 commit comments

Comments
 (0)