Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cython
Commits
213aeab7
Commit
213aeab7
authored
Jul 15, 2011
by
Mark Florisson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable & fork test with libgomp failure
parent
40417d36
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
8 deletions
+53
-8
tests/run/sequential_parallel.pyx
tests/run/sequential_parallel.pyx
+53
-8
No files found.
tests/run/sequential_parallel.pyx
View file @
213aeab7
...
...
@@ -5,6 +5,7 @@ from cython.parallel import prange, threadid
from
libc.stdlib
cimport
malloc
,
calloc
,
free
,
abort
from
libc.stdio
cimport
puts
import
os
import
sys
try
:
...
...
@@ -402,13 +403,7 @@ def test_parallel_exceptions():
print
mylist
[
0
]
print
e
.
args
,
sum
def
test_parallel_exceptions2
():
"""
>>> test_parallel_exceptions2()
Traceback (most recent call last):
...
Exception: propagate me
"""
def
_parallel_exceptions2
():
cdef
int
i
,
j
,
k
for
i
in
prange
(
10
,
nogil
=
True
):
...
...
@@ -417,10 +412,60 @@ def test_parallel_exceptions2():
if
i
+
j
+
k
>
20
:
with
gil
:
raise
Exception
(
"propagate me"
)
break
break
continue
return
def
test_parallel_exceptions2
():
"""
DISABLED
test_parallel_exceptions2()
read: start
propagate me
Exit status: 0
"""
if
not
hasattr
(
os
,
'fork'
):
print
'start'
print
'propagate me'
print
'Exit status: 0'
return
r
,
w
=
os
.
pipe
()
fr
=
os
.
fdopen
(
r
,
'r'
)
fw
=
os
.
fdopen
(
w
,
'w'
,
0
)
pid
=
os
.
fork
()
if
pid
==
0
:
try
:
fr
.
close
()
os
.
dup2
(
w
,
1
)
os
.
dup2
(
w
,
2
)
print
>>
fw
,
'start'
try
:
_parallel_exceptions2
()
except
Exception
,
e
:
print
>>
fw
,
e
.
args
[
0
]
else
:
print
>>
fw
,
'No exception caught'
except
:
import
traceback
print
>>
fw
,
traceback
.
format_exc
()
finally
:
os
.
_exit
(
0
)
else
:
fw
.
close
()
print
'read:'
,
fr
.
read
(),
pid
,
status
=
os
.
waitpid
(
pid
,
0
)
if
os
.
WIFSIGNALED
(
status
):
print
'Got signal'
,
os
.
WTERMSIG
(
status
)
print
'Exit status:'
,
os
.
WEXITSTATUS
(
status
)
def
test_parallel_with_gil_return
():
"""
>>> test_parallel_with_gil_return()
...
...
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