Skip to content

Commit 3e818af

Browse files
authored
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.
1 parent 2dae505 commit 3e818af

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Lib/test/test_threading.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def skip_unless_reliable_fork(test):
4949
if support.HAVE_ASAN_FORK_BUG:
5050
return unittest.skip("libasan has a pthread_create() dead lock related to thread+fork")(test)
5151
if support.check_sanitizer(thread=True):
52-
return unittest.skip("TSAN doesn't support threads after fork")
52+
return unittest.skip("TSAN doesn't support threads after fork")(test)
5353
return test
5454

5555

@@ -781,8 +781,7 @@ def func():
781781
"current is main True\n"
782782
)
783783

784-
@unittest.skipIf(sys.platform in platforms_to_skip, "due to known OS bug")
785-
@support.requires_fork()
784+
@skip_unless_reliable_fork
786785
@unittest.skipUnless(hasattr(os, 'waitpid'), "test needs os.waitpid()")
787786
def test_main_thread_after_fork_from_foreign_thread(self, create_dummy=False):
788787
code = """if 1:

0 commit comments

Comments
 (0)