[3.13] gh-117657: Skip test when running under TSan (GH-121549) (GH-121553)

gh-117657: Skip test when running under TSan (GH-121549)

The ProcessPoolForkserver combined with resource_tracker starts a thread
after forking, which is not supported by TSan.

Also skip test_multiprocessing_fork for the same reason
(cherry picked from commit 04397434aa)

Co-authored-by: Sam Gross <colesbury@gmail.com>
This commit is contained in:
Miss Islington (bot) 2024-07-09 23:37:30 +02:00 committed by GitHub
parent 2f15383161
commit eae8fa1178
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 0 deletions

View File

@ -139,6 +139,7 @@ class FailingInitializerResourcesTest(unittest.TestCase):
def test_spawn(self):
self._test(ProcessPoolSpawnFailingInitializerTest)
@support.skip_if_sanitizer("TSAN doesn't support threads after fork", thread=True)
def test_forkserver(self):
self._test(ProcessPoolForkserverFailingInitializerTest)

View File

@ -12,5 +12,8 @@ if sys.platform == "win32":
if sys.platform == 'darwin':
raise unittest.SkipTest("test may crash on macOS (bpo-33725)")
if support.check_sanitizer(thread=True):
raise unittest.SkipTest("TSAN doesn't support threads after fork")
def load_tests(*args):
return support.load_package_tests(os.path.dirname(__file__), *args)