Kaydet (Commit) a8db3784 authored tarafından Victor Stinner's avatar Victor Stinner

Issue #12700: fix test_faulthandler for Mac OS X Lion

Read from NULL raises SIGILL, not SIGSEGV, on Mac OS X Lion.
üst 96598afa
...@@ -112,7 +112,8 @@ faulthandler.enable() ...@@ -112,7 +112,8 @@ faulthandler.enable()
faulthandler._read_null() faulthandler._read_null()
""".strip(), """.strip(),
3, 3,
'(?:Segmentation fault|Bus error)') # Issue #12700: Read NULL raises SIGILL on Mac OS X Lion
'(?:Segmentation fault|Bus error|Illegal instruction)')
def test_sigsegv(self): def test_sigsegv(self):
self.check_fatal_error(""" self.check_fatal_error("""
...@@ -192,7 +193,7 @@ faulthandler.enable() ...@@ -192,7 +193,7 @@ faulthandler.enable()
faulthandler._read_null(True) faulthandler._read_null(True)
""".strip(), """.strip(),
3, 3,
'(?:Segmentation fault|Bus error)') '(?:Segmentation fault|Bus error|Illegal instruction)')
def test_enable_file(self): def test_enable_file(self):
with temporary_filename() as filename: with temporary_filename() as filename:
...@@ -203,7 +204,7 @@ faulthandler.enable(output) ...@@ -203,7 +204,7 @@ faulthandler.enable(output)
faulthandler._read_null() faulthandler._read_null()
""".strip().format(filename=repr(filename)), """.strip().format(filename=repr(filename)),
4, 4,
'(?:Segmentation fault|Bus error)', '(?:Segmentation fault|Bus error|Illegal instruction)',
filename=filename) filename=filename)
def test_enable_single_thread(self): def test_enable_single_thread(self):
...@@ -213,7 +214,7 @@ faulthandler.enable(all_threads=False) ...@@ -213,7 +214,7 @@ faulthandler.enable(all_threads=False)
faulthandler._read_null() faulthandler._read_null()
""".strip(), """.strip(),
3, 3,
'(?:Segmentation fault|Bus error)', '(?:Segmentation fault|Bus error|Illegal instruction)',
all_threads=False) all_threads=False)
def test_disable(self): def test_disable(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment