]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #12700: fix test_faulthandler for Mac OS X Lion
authorVictor Stinner <victor.stinner@haypocalc.com>
Mon, 8 Aug 2011 20:43:45 +0000 (22:43 +0200)
committerVictor Stinner <victor.stinner@haypocalc.com>
Mon, 8 Aug 2011 20:43:45 +0000 (22:43 +0200)
Read from NULL raises SIGILL, not SIGSEGV, on Mac OS X Lion.

Lib/test/test_faulthandler.py

index c8a803049f1be6d702762817a7dc081ab7cc7722..331dd2ec86e12bb6b53e2788fffaf2e045a6da41 100644 (file)
@@ -112,7 +112,8 @@ faulthandler.enable()
 faulthandler._read_null()
 """.strip(),
             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):
         self.check_fatal_error("""
@@ -192,7 +193,7 @@ faulthandler.enable()
 faulthandler._read_null(True)
 """.strip(),
             3,
-            '(?:Segmentation fault|Bus error)')
+            '(?:Segmentation fault|Bus error|Illegal instruction)')
 
     def test_enable_file(self):
         with temporary_filename() as filename:
@@ -203,7 +204,7 @@ faulthandler.enable(output)
 faulthandler._read_null()
 """.strip().format(filename=repr(filename)),
                 4,
-                '(?:Segmentation fault|Bus error)',
+                '(?:Segmentation fault|Bus error|Illegal instruction)',
                 filename=filename)
 
     def test_enable_single_thread(self):
@@ -213,7 +214,7 @@ faulthandler.enable(all_threads=False)
 faulthandler._read_null()
 """.strip(),
             3,
-            '(?:Segmentation fault|Bus error)',
+            '(?:Segmentation fault|Bus error|Illegal instruction)',
             all_threads=False)
 
     def test_disable(self):