Skip to content

Commit 7c015de

Browse files
committed
WIP
1 parent fddf26c commit 7c015de

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

Lib/test/libregrtest/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ def find_tests(self, tests: TestList | None = None) -> tuple[TestTuple, TestList
201201
setup_pgo_tests(self.cmdline_args, self.pgo_extended)
202202

203203
if self.tsan:
204-
setup_tsan_tests(self.cmdline_args)
204+
setup_tsan_tests(exclude_tests)
205205

206206
if self.tsan_parallel:
207207
setup_tsan_parallel_tests(self.cmdline_args)

Lib/test/libregrtest/tsan.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@
3131
'test_free_threading',
3232
]
3333

34+
TSAN_EXCLUDE_TESTS = [
35+
'test_multiprocessing_fork',
36+
'test_multiprocessing_forkserver',
37+
'test_multiprocessing_spawn',
38+
]
39+
3440
# Tests that should be run with `--parallel-threads=N` under TSAN. These tests
3541
# typically do not use threads, but are run multiple times in parallel by
3642
# the regression test runner with the `--parallel-threads` option enabled.
@@ -40,9 +46,8 @@
4046
]
4147

4248

43-
def setup_tsan_tests(cmdline_args) -> None:
44-
if not cmdline_args:
45-
cmdline_args[:] = TSAN_TESTS[:]
49+
def setup_tsan_tests(exclude_tests) -> None:
50+
exclude_tests.update(set(TSAN_EXCLUDE_TESTS))
4651

4752
def setup_tsan_parallel_tests(cmdline_args) -> None:
4853
if not cmdline_args:

Lib/test/test_regrtest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1200,6 +1200,7 @@ def test_coverage(self):
12001200
r'(?: *[0-9]+ *[0-9]{1,2}\.[0-9]% *[^ ]+ +\([^)]+\)+)+')
12011201
self.check_line(output, regex)
12021202

1203+
# TODO(sgross): flaky in TSan
12031204
def test_wait(self):
12041205
# test --wait
12051206
test = self.create_test('wait')

0 commit comments

Comments
 (0)