diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2013-06-17 21:37:59 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2013-06-17 21:37:59 (GMT) |
commit | 56785395004da961a3dc695217e5d3e3f961920a (patch) | |
tree | 2c74eea7095fc947a46a423205f7294b1ce97096 /Lib | |
parent | 43b2639fe2a05f74b987bd7e8818a958149565c8 (diff) | |
download | cpython-56785395004da961a3dc695217e5d3e3f961920a.zip cpython-56785395004da961a3dc695217e5d3e3f961920a.tar.gz cpython-56785395004da961a3dc695217e5d3e3f961920a.tar.bz2 |
test_faulthandler: use _sigsegv() instead of _read_null()
faulthandler._read_null() is not reliable: it does not crash on AIX.
Diffstat (limited to 'Lib')
-rw-r--r-- | 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 index c171faf..5afc7cc 100644 --- a/Lib/test/test_faulthandler.py +++ b/Lib/test/test_faulthandler.py @@ -206,20 +206,20 @@ faulthandler._read_null(True) 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 @@ faulthandler._read_null() import faulthandler faulthandler.enable() faulthandler.disable() -faulthandler._read_null() +faulthandler._sigsegv() """.strip() not_expected = 'Fatal Python error' with support.suppress_crash_popup(): |