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
7cf03891
Commit
7cf03891
authored
Apr 16, 2010
by
Mark Dickinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #4970: move linuxthreads check outside the affected test, and use skipIf
parent
5bfe1467
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
10 deletions
+13
-10
Lib/test/test_os.py
Lib/test/test_os.py
+13
-10
No files found.
Lib/test/test_os.py
View file @
7cf03891
...
...
@@ -13,6 +13,15 @@ import time
import
shutil
from
test
import
support
# Detect whether we're on a Linux system that uses the (now outdated
# and unmaintained) linuxthreads threading library. There's an issue
# when combining linuxthreads with a failed execv call: see
# http://bugs.python.org/issue4970.
if
"CS_GNU_LIBPTHREAD_VERSION"
in
os
.
confstr_names
:
libpthread
=
os
.
confstr
(
"CS_GNU_LIBPTHREAD_VERSION"
)
USING_LINUXTHREADS
=
libpthread
.
startswith
(
"linuxthreads"
)
else
:
USING_LINUXTHREADS
=
False
# Tests creating TESTFN
class
FileTests
(
unittest
.
TestCase
):
...
...
@@ -588,17 +597,11 @@ class URandomTests(unittest.TestCase):
pass
class
ExecTests
(
unittest
.
TestCase
):
@
unittest
.
skipIf
(
USING_LINUXTHREADS
,
"avoid triggering a linuxthreads bug: see issue #4970"
)
def
test_execvpe_with_bad_program
(
self
):
try
:
# 'linuxthreads-0.10' or 'NPTL 2.10.2'
pthread
=
os
.
confstr
(
"CS_GNU_LIBPTHREAD_VERSION"
)
linuxthreads
=
pthread
.
startswith
(
"linuxthreads"
)
except
ValueError
:
linuxthreads
=
False
if
linuxthreads
:
raise
unittest
.
SkipTest
(
"avoid linuxthreads bug: see issue #4970"
)
self
.
assertRaises
(
OSError
,
os
.
execvpe
,
'no such app-'
,
[
'no such app-'
],
None
)
self
.
assertRaises
(
OSError
,
os
.
execvpe
,
'no such app-'
,
[
'no such app-'
],
None
)
def
test_execvpe_with_bad_arglist
(
self
):
self
.
assertRaises
(
ValueError
,
os
.
execvpe
,
'notepad'
,
[],
None
)
...
...
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