Skip to content

Commit f25900e

Browse files
committed
gh-138163: scheduler tests for posix_spawn fail on glibc for SCHED_BATCH
1 parent fc0305a commit f25900e

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

Lib/test/test_posix.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2036,6 +2036,9 @@ 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 [os.SCHED_BATCH, os.SCHED_IDLE, os.SCHED_DEADLINE],
2041+
"On glibc, posix_spawnattr_setschedpolicy cannot change the policy")
20392042
def test_setscheduler_with_policy(self):
20402043
policy = os.sched_getscheduler(0)
20412044
priority = os.sched_get_priority_min(policy)

0 commit comments

Comments
 (0)