Skip to content

Commit

Permalink
[3.13] gh-117657: Skip tests that use threads after fork (GH-122194) (#…
Browse files Browse the repository at this point in the history
…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]>
  • Loading branch information
miss-islington and colesbury authored Jul 23, 2024
1 parent 1d601a1 commit e0f540d
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 @@ -1903,6 +1903,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 @@ -1949,6 +1950,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 @@ -1968,6 +1970,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 e0f540d

Please sign in to comment.