Skip to content

Commit e0f540d

Browse files
[3.13] gh-117657: Skip tests that use threads after fork (GH-122194) (#122198)
These tests fail when run under thread sanitizer due to the use of fork and threads. (cherry picked from commit 64e221d) Co-authored-by: Sam Gross <[email protected]>
1 parent 1d601a1 commit e0f540d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Lib/test/test_asyncio/test_unix_events.py

+3
Original file line numberDiff line numberDiff line change
@@ -1903,6 +1903,7 @@ async def test_fork_not_share_event_loop(self):
19031903
wait_process(pid, exitcode=0)
19041904

19051905
@hashlib_helper.requires_hashdigest('md5')
1906+
@support.skip_if_sanitizer("TSAN doesn't support threads after fork", thread=True)
19061907
def test_fork_signal_handling(self):
19071908
self.addCleanup(multiprocessing_cleanup_tests)
19081909

@@ -1949,6 +1950,7 @@ async def func():
19491950
self.assertTrue(child_handled.is_set())
19501951

19511952
@hashlib_helper.requires_hashdigest('md5')
1953+
@support.skip_if_sanitizer("TSAN doesn't support threads after fork", thread=True)
19521954
def test_fork_asyncio_run(self):
19531955
self.addCleanup(multiprocessing_cleanup_tests)
19541956

@@ -1968,6 +1970,7 @@ async def child_main():
19681970
self.assertEqual(result.value, 42)
19691971

19701972
@hashlib_helper.requires_hashdigest('md5')
1973+
@support.skip_if_sanitizer("TSAN doesn't support threads after fork", thread=True)
19711974
def test_fork_asyncio_subprocess(self):
19721975
self.addCleanup(multiprocessing_cleanup_tests)
19731976

0 commit comments

Comments
 (0)