summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-03-15 16:23:35 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2016-03-15 16:23:35 (GMT)
commit57003f81ead9ff38150c1e4821811c66c296d33c (patch)
tree032dc11bab422f9a5b5bc0e0470b8f9e9e9889f3 /Lib
parent4ddee7f5fd38137629eea15f3bf4b48dbdbcb356 (diff)
downloadcpython-57003f81ead9ff38150c1e4821811c66c296d33c.zip
cpython-57003f81ead9ff38150c1e4821811c66c296d33c.tar.gz
cpython-57003f81ead9ff38150c1e4821811c66c296d33c.tar.bz2
faulthandler: Test Py_FatalError() with GIL released
Issue #26558.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_faulthandler.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_faulthandler.py b/Lib/test/test_faulthandler.py
index 0d86cb5..12969d5 100644
--- a/Lib/test/test_faulthandler.py
+++ b/Lib/test/test_faulthandler.py
@@ -185,6 +185,14 @@ class FaultHandlerTests(unittest.TestCase):
2,
'xyz')
+ def test_fatal_error_without_gil(self):
+ self.check_fatal_error("""
+ import faulthandler
+ faulthandler._fatal_error(b'xyz', True)
+ """,
+ 2,
+ 'xyz')
+
@unittest.skipIf(sys.platform.startswith('openbsd') and HAVE_THREADS,
"Issue #12868: sigaltstack() doesn't work on "
"OpenBSD if Python is compiled with pthread")