diff options
author | mpage <mpage@meta.com> | 2024-05-03 08:14:26 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-03 11:14:26 -0400 |
commit | 3e818afb9b7c557aa633aeb3d5c4959750feeab0 (patch) | |
tree | d31ec34bce7d2e0ea96f9d39b7e14f8d88bd37e5 /Lib/test/test_threading.py | |
parent | 2dae505e87e3815f087d4b07a71bb2c5cce22304 (diff) | |
download | cpython-3e818afb9b7c557aa633aeb3d5c4959750feeab0.tar.gz cpython-3e818afb9b7c557aa633aeb3d5c4959750feeab0.zip |
gh-118495: Skip test using threads after forking when running with TSAN (#118530)
This is unsupported. Note that `skip_unless_reliable_fork()` checks for
the conditions used by the decorators that were removed, along with checking
for TSAN.
Diffstat (limited to 'Lib/test/test_threading.py')
-rw-r--r-- | Lib/test/test_threading.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py index 0047e8a8798..329767aa82e 100644 --- a/Lib/test/test_threading.py +++ b/Lib/test/test_threading.py @@ -49,7 +49,7 @@ def skip_unless_reliable_fork(test): if support.HAVE_ASAN_FORK_BUG: return unittest.skip("libasan has a pthread_create() dead lock related to thread+fork")(test) if support.check_sanitizer(thread=True): - return unittest.skip("TSAN doesn't support threads after fork") + return unittest.skip("TSAN doesn't support threads after fork")(test) return test @@ -781,8 +781,7 @@ class ThreadTests(BaseTestCase): "current is main True\n" ) - @unittest.skipIf(sys.platform in platforms_to_skip, "due to known OS bug") - @support.requires_fork() + @skip_unless_reliable_fork @unittest.skipUnless(hasattr(os, 'waitpid'), "test needs os.waitpid()") def test_main_thread_after_fork_from_foreign_thread(self, create_dummy=False): code = """if 1: |