Skip to content

Commit ae8ec01

Browse files
jxes993409miss-islington
authored andcommitted
gh-138163: skip failures if tests are run with SCHED_BATCH on glibc (GH-138576)
(cherry picked from commit 4929414) Co-authored-by: jxes993409 <[email protected]>
1 parent a5f7e02 commit ae8ec01

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Lib/test/test_posix.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1991,6 +1991,12 @@ 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+
os.SCHED_DEADLINE],
1999+
"Skip test due to glibc posix_spawn policy")
19942000
def test_setscheduler_with_policy(self):
19952001
policy = os.sched_getscheduler(0)
19962002
priority = os.sched_get_priority_min(policy)

0 commit comments

Comments
 (0)