(cherry picked from commit
492941459acb5b5a104d96414288601d2e2b7e6f)
This backport omits SCHED_DEADLINE, which was added in 3.14.
---------
Co-authored-by: jxes993409 <68891412+jxes993409@users.noreply.github.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
@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],
+ "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)