Skip to content

Commit f67f383

Browse files
committed
gh-117657: Skip tests that use threads after fork
These tests fail when run under thread sanitizer due to the use of fork and threads..
1 parent c908d1f commit f67f383

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
@@ -1212,6 +1212,7 @@ async def test_fork_not_share_event_loop(self):
12121212
wait_process(pid, exitcode=0)
12131213

12141214
@hashlib_helper.requires_hashdigest('md5')
1215+
@support.skip_if_sanitizer("TSAN doesn't support threads after fork", thread=True)
12151216
def test_fork_signal_handling(self):
12161217
self.addCleanup(multiprocessing_cleanup_tests)
12171218

@@ -1258,6 +1259,7 @@ async def func():
12581259
self.assertTrue(child_handled.is_set())
12591260

12601261
@hashlib_helper.requires_hashdigest('md5')
1262+
@support.skip_if_sanitizer("TSAN doesn't support threads after fork", thread=True)
12611263
def test_fork_asyncio_run(self):
12621264
self.addCleanup(multiprocessing_cleanup_tests)
12631265

@@ -1277,6 +1279,7 @@ async def child_main():
12771279
self.assertEqual(result.value, 42)
12781280

12791281
@hashlib_helper.requires_hashdigest('md5')
1282+
@support.skip_if_sanitizer("TSAN doesn't support threads after fork", thread=True)
12801283
def test_fork_asyncio_subprocess(self):
12811284
self.addCleanup(multiprocessing_cleanup_tests)
12821285

0 commit comments

Comments
 (0)