https://github.com/python/cpython/commit/3b548adc765a83bedc316b19cb922a02c7a201f1
commit: 3b548adc765a83bedc316b19cb922a02c7a201f1
branch: main
author: Sam Gross <[email protected]>
committer: colesbury <[email protected]>
date: 2025-02-11T12:09:43-05:00
summary:

gh-129980: Include test name in TSAN filename in multiprocess test runner 
(GH-129981)

files:
M Lib/test/libregrtest/worker.py

diff --git a/Lib/test/libregrtest/worker.py b/Lib/test/libregrtest/worker.py
index 0c9f5bd6e42f11..5d75bf7ae787ed 100644
--- a/Lib/test/libregrtest/worker.py
+++ b/Lib/test/libregrtest/worker.py
@@ -56,6 +56,15 @@ def create_worker_process(runtests: WorkerRunTests, 
output_fd: int,
     if USE_PROCESS_GROUP and test_name not in NEED_TTY:
         kwargs['start_new_session'] = True
 
+    # Include the test name in the TSAN log file name
+    if 'TSAN_OPTIONS' in env:
+        parts = env['TSAN_OPTIONS'].split(' ')
+        for i, part in enumerate(parts):
+            if part.startswith('log_path='):
+                parts[i] = f'{part}.{test_name}'
+                break
+        env['TSAN_OPTIONS'] = ' '.join(parts)
+
     # Pass json_file to the worker process
     json_file = runtests.json_file
     json_file.configure_subprocess(kwargs)

_______________________________________________
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