diff options
author | Antoine Pitrou <antoine@python.org> | 2024-03-18 09:52:54 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-18 09:52:54 (GMT) |
commit | 25243b1461e524560639ebe54bab9b689b6cc31e (patch) | |
tree | 0582874fb0884573bd32609e5ebb4ec367ca85e5 /Lib/test | |
parent | fcb230180faff828aa67ca2ee1aa94fc522e6daa (diff) | |
download | cpython-25243b1461e524560639ebe54bab9b689b6cc31e.zip cpython-25243b1461e524560639ebe54bab9b689b6cc31e.tar.gz cpython-25243b1461e524560639ebe54bab9b689b6cc31e.tar.bz2 |
[3.12] gh-112536: Add TSAN build on Github Actions (GH-116872)
(cherry picked from commit 20578a1f68c841a264b72b00591b11ab2fa77b43)
Co-authored-by: Donghee Na <donghee.na@python.org>
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_concurrent_futures/util.py | 4 | ||||
-rw-r--r-- | Lib/test/test_logging.py | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_concurrent_futures/util.py b/Lib/test/test_concurrent_futures/util.py index dc48bec..fc6030e 100644 --- a/Lib/test/test_concurrent_futures/util.py +++ b/Lib/test/test_concurrent_futures/util.py @@ -85,6 +85,8 @@ class ProcessPoolForkMixin(ExecutorMixin): self.skipTest("ProcessPoolExecutor unavailable on this system") if sys.platform == "win32": self.skipTest("require unix system") + if support.check_sanitizer(thread=True): + self.skipTest("TSAN doesn't support threads after fork") return super().get_context() @@ -111,6 +113,8 @@ class ProcessPoolForkserverMixin(ExecutorMixin): self.skipTest("ProcessPoolExecutor unavailable on this system") if sys.platform == "win32": self.skipTest("require unix system") + if support.check_sanitizer(thread=True): + self.skipTest("TSAN doesn't support threads after fork") return super().get_context() diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py index 463bbc5..6bff48c 100644 --- a/Lib/test/test_logging.py +++ b/Lib/test/test_logging.py @@ -80,6 +80,9 @@ except ImportError: skip_if_asan_fork = unittest.skipIf( support.HAVE_ASAN_FORK_BUG, "libasan has a pthread_create() dead lock related to thread+fork") +skip_if_tsan_fork = unittest.skipIf( + support.check_sanitizer(thread=True), + "TSAN doesn't support threads after fork") class BaseTest(unittest.TestCase): @@ -737,6 +740,7 @@ class HandlerTest(BaseTest): @support.requires_fork() @threading_helper.requires_working_threading() @skip_if_asan_fork + @skip_if_tsan_fork def test_post_fork_child_no_deadlock(self): """Ensure child logging locks are not held; bpo-6721 & bpo-36533.""" class _OurHandler(logging.Handler): |