Skip to content

Commit 6396c77

Browse files
[3.13] gh-117657: Skip tests that fork with threads under TSan (GH-121599) (#121819)
This avoids messages like: ThreadSanitizer: starting new threads after multi-threaded fork is not supported. Dying (set die_after_fork=0 to override) (cherry picked from commit 82a4dac) Co-authored-by: Sam Gross <[email protected]>
1 parent 0a634e3 commit 6396c77

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Lib/test/test_logging.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3971,6 +3971,7 @@ def test_config_queue_handler_invalid_config_does_not_create_multiprocessing_man
39713971
)
39723972
manager.assert_not_called()
39733973

3974+
@skip_if_tsan_fork
39743975
@support.requires_subprocess()
39753976
def test_multiprocessing_queues(self):
39763977
# See gh-119819
@@ -4283,6 +4284,7 @@ def test_queue_listener_with_multiple_handlers(self):
42834284
import multiprocessing
42844285
from unittest.mock import patch
42854286

4287+
@skip_if_tsan_fork
42864288
@threading_helper.requires_working_threading()
42874289
class QueueListenerTest(BaseTest):
42884290
"""
@@ -5183,6 +5185,7 @@ def _extract_logrecord_process_name(key, logMultiprocessing, conn=None):
51835185
else:
51845186
return results
51855187

5188+
@skip_if_tsan_fork
51865189
def test_multiprocessing(self):
51875190
support.skip_if_broken_multiprocessing_synchronize()
51885191
multiprocessing_imported = 'multiprocessing' in sys.modules

0 commit comments

Comments
 (0)