https://github.com/python/cpython/commit/56d0f9af147b2280ea0af7af5e57df1a01271991 commit: 56d0f9af147b2280ea0af7af5e57df1a01271991 branch: main author: Sam Gross <colesb...@gmail.com> committer: colesbury <colesb...@gmail.com> date: 2025-03-21T15:16:08-04:00 summary:
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. files: M Lib/test/test__interpchannels.py M Lib/test/test__interpreters.py M Lib/test/test_capi/test_misc.py M Lib/test/test_faulthandler.py diff --git a/Lib/test/test__interpchannels.py b/Lib/test/test__interpchannels.py index 4a7f04b9df9843..e4c1ad854514ed 100644 --- a/Lib/test/test__interpchannels.py +++ b/Lib/test/test__interpchannels.py @@ -6,7 +6,7 @@ import time import unittest -from test.support import import_helper +from test.support import import_helper, skip_if_sanitizer _channels = import_helper.import_module('_interpchannels') from test.support.interpreters import _crossinterp @@ -365,6 +365,7 @@ def test_shareable(self): #self.assertIsNot(got, obj) +@skip_if_sanitizer('gh-129824: race on _waiting_release', thread=True) class ChannelTests(TestBase): def test_create_cid(self): diff --git a/Lib/test/test__interpreters.py b/Lib/test/test__interpreters.py index fd444f1f06ce48..7fba16bafbac37 100644 --- a/Lib/test/test__interpreters.py +++ b/Lib/test/test__interpreters.py @@ -365,6 +365,7 @@ def test_unique_id(self): self.assertEqual(len(seen), 100) + @support.skip_if_sanitizer('gh-129824: race on tp_flags', thread=True) def test_in_thread(self): lock = threading.Lock() id = None diff --git a/Lib/test/test_capi/test_misc.py b/Lib/test/test_capi/test_misc.py index 2e1e8e77d620d1..98dc3b42ef0bec 100644 --- a/Lib/test/test_capi/test_misc.py +++ b/Lib/test/test_capi/test_misc.py @@ -1411,6 +1411,7 @@ def run_tasks(): self.assertNotIn(task.requester_tid, runner_tids) @requires_subinterpreters + @support.skip_if_sanitizer("gh-129824: race on assign_version_tag", thread=True) def test_isolated_subinterpreter(self): # We exercise the most important permutations. diff --git a/Lib/test/test_faulthandler.py b/Lib/test/test_faulthandler.py index bcebaef0a5101a..998d8e3ce25285 100644 --- a/Lib/test/test_faulthandler.py +++ b/Lib/test/test_faulthandler.py @@ -227,6 +227,7 @@ def test_fatal_error_c_thread(self): 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 @@ def test_sigabrt(self): @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 @@ def test_sigfpe(self): @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 @@ def test_sigbus(self): @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(""" _______________________________________________ Python-checkins mailing list -- python-checkins@python.org To unsubscribe send an email to python-checkins-le...@python.org https://mail.python.org/mailman3/lists/python-checkins.python.org/ Member address: arch...@mail-archive.com