[Python-checkins] cpython (merge 3.3 -> default): (Merge 3.3) test_faulthandler: use _sigsegv() instead of _read_null()
victor.stinner
python-checkins at python.org
Mon Jun 17 23:39:20 CEST 2013
http://hg.python.org/cpython/rev/e71b00ff5bae
changeset: 84199:e71b00ff5bae
parent: 84196:f6f70f1ab124
parent: 84198:f7441b9ef363
user: Victor Stinner <victor.stinner at gmail.com>
date: Mon Jun 17 23:39:06 2013 +0200
summary:
(Merge 3.3) test_faulthandler: use _sigsegv() instead of _read_null()
faulthandler._read_null() is not reliable: it does not crash on AIX.
files:
Lib/test/test_faulthandler.py | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/Lib/test/test_faulthandler.py b/Lib/test/test_faulthandler.py
--- a/Lib/test/test_faulthandler.py
+++ b/Lib/test/test_faulthandler.py
@@ -206,20 +206,20 @@
import faulthandler
output = open({filename}, 'wb')
faulthandler.enable(output)
-faulthandler._read_null()
+faulthandler._sigsegv()
""".strip().format(filename=repr(filename)),
4,
- '(?:Segmentation fault|Bus error|Illegal instruction)',
+ 'Segmentation fault',
filename=filename)
def test_enable_single_thread(self):
self.check_fatal_error("""
import faulthandler
faulthandler.enable(all_threads=False)
-faulthandler._read_null()
+faulthandler._sigsegv()
""".strip(),
3,
- '(?:Segmentation fault|Bus error|Illegal instruction)',
+ 'Segmentation fault',
all_threads=False)
def test_disable(self):
@@ -227,7 +227,7 @@
import faulthandler
faulthandler.enable()
faulthandler.disable()
-faulthandler._read_null()
+faulthandler._sigsegv()
""".strip()
not_expected = 'Fatal Python error'
with support.suppress_crash_popup():
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list