https://github.com/python/cpython/commit/3e818afb9b7c557aa633aeb3d5c4959750feeab0
commit: 3e818afb9b7c557aa633aeb3d5c4959750feeab0
branch: main
author: mpage <[email protected]>
committer: colesbury <[email protected]>
date: 2024-05-03T11:14:26-04:00
summary:

gh-118495: Skip test using threads after forking when running with TSAN 
(#118530)

This is unsupported. Note that `skip_unless_reliable_fork()` checks for
the conditions used by the decorators that were removed, along with checking
for TSAN.

files:
M Lib/test/test_threading.py

diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py
index 0047e8a8798d4e..329767aa82e336 100644
--- a/Lib/test/test_threading.py
+++ b/Lib/test/test_threading.py
@@ -49,7 +49,7 @@ def skip_unless_reliable_fork(test):
     if support.HAVE_ASAN_FORK_BUG:
         return unittest.skip("libasan has a pthread_create() dead lock related 
to thread+fork")(test)
     if support.check_sanitizer(thread=True):
-        return unittest.skip("TSAN doesn't support threads after fork")
+        return unittest.skip("TSAN doesn't support threads after fork")(test)
     return test
 
 
@@ -781,8 +781,7 @@ def func():
                          "current is main True\n"
                          )
 
-    @unittest.skipIf(sys.platform in platforms_to_skip, "due to known OS bug")
-    @support.requires_fork()
+    @skip_unless_reliable_fork
     @unittest.skipUnless(hasattr(os, 'waitpid'), "test needs os.waitpid()")
     def test_main_thread_after_fork_from_foreign_thread(self, 
create_dummy=False):
         code = """if 1:

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to