Skip to content

Commit 4929414

Browse files
authored
gh-138163: skip failures if tests are run with SCHED_BATCH on glibc (GH-138576)
1 parent 4499161 commit 4929414

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
@@ -2036,6 +2036,12 @@ def test_setscheduler_only_param(self):
20362036
@requires_sched
20372037
@unittest.skipIf(sys.platform.startswith(('freebsd', 'netbsd')),
20382038
"bpo-34685: test can fail on BSD")
2039+
@unittest.skipIf(platform.libc_ver()[0] == 'glibc' and
2040+
os.sched_getscheduler(0) in [
2041+
os.SCHED_BATCH,
2042+
os.SCHED_IDLE,
2043+
os.SCHED_DEADLINE],
2044+
"Skip test due to glibc posix_spawn policy")
20392045
def test_setscheduler_with_policy(self):
20402046
policy = os.sched_getscheduler(0)
20412047
priority = os.sched_get_priority_min(policy)

0 commit comments

Comments
 (0)