Skip to content

Commit

Permalink
gh-118495: Skip test using threads after forking when running with TS…
Browse files Browse the repository at this point in the history
…AN (#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.
  • Loading branch information
mpage committed May 3, 2024
1 parent 2dae505 commit 3e818af
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Lib/test/test_threading.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -781,8 +781,7 @@ def func():
"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:
Expand Down

0 comments on commit 3e818af

Please sign in to comment.