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

(cherry picked from commit 492941459a)

Co-authored-by: jxes993409 <68891412+jxes993409@users.noreply.github.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
This commit is contained in:
Miss Islington (bot) 2025-10-07 20:01:51 +02:00 committed by GitHub
parent d7500f6078
commit 7a1a79d731
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2036,6 +2036,12 @@ class _PosixSpawnMixin:
@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,
os.SCHED_DEADLINE],
"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)