gh-117657: Skip some tests when running with TSAN (gh-131555)

The subinterpreter tests have data races (see gh-129824).

TSAN attempts to intercept some of the fatal signals, which can lead to
bogus reports. We could possibly handle these via TSAN_OPTIONS, but it's
simpler to just skip those tests -- they're not multithreaded anyways.
This commit is contained in:
Sam Gross 2025-03-21 15:16:08 -04:00 committed by GitHub
parent b92ee14b80
commit 56d0f9af14
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 8 additions and 1 deletions

View file

@ -227,6 +227,7 @@ class FaultHandlerTests(unittest.TestCase):
func='faulthandler_fatal_error_thread',
py_fatal_error=True)
@support.skip_if_sanitizer("TSAN itercepts SIGABRT", thread=True)
def test_sigabrt(self):
self.check_fatal_error("""
import faulthandler
@ -238,6 +239,7 @@ class FaultHandlerTests(unittest.TestCase):
@unittest.skipIf(sys.platform == 'win32',
"SIGFPE cannot be caught on Windows")
@support.skip_if_sanitizer("TSAN itercepts SIGFPE", thread=True)
def test_sigfpe(self):
self.check_fatal_error("""
import faulthandler
@ -249,6 +251,7 @@ class FaultHandlerTests(unittest.TestCase):
@unittest.skipIf(_testcapi is None, 'need _testcapi')
@unittest.skipUnless(hasattr(signal, 'SIGBUS'), 'need signal.SIGBUS')
@support.skip_if_sanitizer("TSAN itercepts SIGBUS", thread=True)
@skip_segfault_on_android
def test_sigbus(self):
self.check_fatal_error("""
@ -263,6 +266,7 @@ class FaultHandlerTests(unittest.TestCase):
@unittest.skipIf(_testcapi is None, 'need _testcapi')
@unittest.skipUnless(hasattr(signal, 'SIGILL'), 'need signal.SIGILL')
@support.skip_if_sanitizer("TSAN itercepts SIGILL", thread=True)
@skip_segfault_on_android
def test_sigill(self):
self.check_fatal_error("""