@@ -1660,14 +1660,17 @@ def test_setsigdef_wrong_type(self):
1660
1660
1661
1661
@requires_sched
1662
1662
def test_setscheduler_only_param (self ):
1663
+ if sys .platform .startswith (('freebsd' , 'netbsd' , 'openbsd' , 'gnukfreebsd' )):
1664
+ raise unittest .SkipTest ("test may fail on BSD" )
1665
+
1663
1666
policy = os .sched_getscheduler (0 )
1664
1667
priority = os .sched_get_priority_min (policy )
1665
1668
code = textwrap .dedent (f"""\
1666
- import os
1669
+ import os, sys
1667
1670
if os.sched_getscheduler(0) != { policy } :
1668
- os .exit(101)
1671
+ sys .exit(101)
1669
1672
if os.sched_getparam(0).sched_priority != { priority } :
1670
- os .exit(102)""" )
1673
+ sys .exit(102)""" )
1671
1674
pid = posix .posix_spawn (
1672
1675
sys .executable ,
1673
1676
[sys .executable , '-c' , code ],
@@ -1678,14 +1681,17 @@ def test_setscheduler_only_param(self):
1678
1681
1679
1682
@requires_sched
1680
1683
def test_setscheduler_with_policy (self ):
1684
+ if sys .platform .startswith (('freebsd' , 'netbsd' , 'openbsd' , 'gnukfreebsd' )):
1685
+ raise unittest .SkipTest ("test may fail on BSD" )
1686
+
1681
1687
policy = os .sched_getscheduler (0 )
1682
1688
priority = os .sched_get_priority_min (policy )
1683
1689
code = textwrap .dedent (f"""\
1684
- import os
1690
+ import os, sys
1685
1691
if os.sched_getscheduler(0) != { policy } :
1686
- os .exit(101)
1692
+ sys .exit(101)
1687
1693
if os.sched_getparam(0).sched_priority != { priority } :
1688
- os .exit(102)""" )
1694
+ sys .exit(102)""" )
1689
1695
pid = posix .posix_spawn (
1690
1696
sys .executable ,
1691
1697
[sys .executable , '-c' , code ],
0 commit comments