Skip to content

Commit

Permalink
pythongh-117657: Skip tests that use threads after fork (python#122194)
Browse files Browse the repository at this point in the history
These tests fail when run under thread sanitizer due to the use of fork
and threads.
  • Loading branch information
colesbury authored and nohlson committed Jul 24, 2024
1 parent 6568455 commit efa6eae
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Lib/test/test_asyncio/test_unix_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -1212,6 +1212,7 @@ async def test_fork_not_share_event_loop(self):
wait_process(pid, exitcode=0)

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

Expand Down Expand Up @@ -1258,6 +1259,7 @@ async def func():
self.assertTrue(child_handled.is_set())

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

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

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

Expand Down

0 comments on commit efa6eae

Please sign in to comment.