Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
3be00953
Commit
3be00953
authored
Nov 22, 2011
by
Charles-François Natali
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #12156: Skip test_multiprocessing on systems which don't support enough
POSIX semaphores (among which FreeBSD < 8).
parent
ab1d16b4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
Lib/test/test_multiprocessing.py
Lib/test/test_multiprocessing.py
+18
-0
No files found.
Lib/test/test_multiprocessing.py
View file @
3be00953
...
...
@@ -98,6 +98,22 @@ except ImportError:
Structure
=
object
c_int
=
c_double
=
None
def
check_enough_semaphores
():
"""Check that the system supports enough semaphores to run the test."""
# minimum number of semaphores available according to POSIX
nsems_min
=
256
try
:
nsems
=
os
.
sysconf
(
"SC_SEM_NSEMS_MAX"
)
except
(
AttributeError
,
ValueError
):
# sysconf not available or setting not available
return
if
nsems
==
-
1
or
nsems
>=
nsems_min
:
return
raise
unittest
.
SkipTest
(
"The OS doesn't support enough semaphores "
"to run the test (required: %d)."
%
nsems_min
)
#
# Creates a wrapper for a function which records the time it takes to finish
#
...
...
@@ -2294,6 +2310,8 @@ def test_main(run=None):
except
OSError
:
raise
unittest
.
SkipTest
(
"OSError raises on RLock creation, see issue 3111!"
)
check_enough_semaphores
()
if
run
is
None
:
from
test.support
import
run_unittest
as
run
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment