[Python-checkins] cpython: Issue #12783: Fix test_posix failures on FreeBSD buildbots, due to
charles-francois.natali
python-checkins at python.org
Sun Aug 21 12:41:16 CEST 2011
http://hg.python.org/cpython/rev/a04e70d7d76c
changeset: 72013:a04e70d7d76c
user: Charles-François Natali <neologix at free.fr>
date: Sun Aug 21 12:41:43 2011 +0200
summary:
Issue #12783: Fix test_posix failures on FreeBSD buildbots, due to
sched_setparam() returning EINVAL for processes with SCHED_OTHER scheduling
policy.
files:
Lib/test/test_posix.py | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py
--- a/Lib/test/test_posix.py
+++ b/Lib/test/test_posix.py
@@ -875,8 +875,14 @@
except OSError as e:
if e.errno != errno.EPERM:
raise
- posix.sched_setparam(0, param)
- self.assertRaises(OSError, posix.sched_setparam, -1, param)
+
+ # POSIX states that calling sched_setparam() on a process with a
+ # scheduling policy other than SCHED_FIFO or SCHED_RR is
+ # implementation-defined: FreeBSD returns EINVAL.
+ if not sys.platform.startswith('freebsd'):
+ posix.sched_setparam(0, param)
+ self.assertRaises(OSError, posix.sched_setparam, -1, param)
+
self.assertRaises(OSError, posix.sched_setscheduler, -1, mine, param)
self.assertRaises(TypeError, posix.sched_setscheduler, 0, mine, None)
self.assertRaises(TypeError, posix.sched_setparam, 0, 43)
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list