]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-117657: Skip test when running under TSan (GH-121549) (GH-121553)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 9 Jul 2024 21:37:30 +0000 (23:37 +0200)
committerGitHub <noreply@github.com>
Tue, 9 Jul 2024 21:37:30 +0000 (21:37 +0000)
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 04397434aad9b31328785e17ac7b3a2d5097269b)

Co-authored-by: Sam Gross <colesbury@gmail.com>
Lib/test/test_concurrent_futures/test_init.py
Lib/test/test_multiprocessing_fork/__init__.py

index a36f592b79b7cfddd2e32ba22ab55d2dd9d25220..df64092930931847fb6db750dbbb3cd3d6779762 100644 (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)
 
index aa1fff50b28f5f79ca57c973c044e1179ee8c925..b35e82879d7fe2a1e34ec089dded0333dca8b82e 100644 (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)