Debian Codegraph @

Lib/test/libregrtest/tsan.py

raw
1 # Set of tests run by default if --tsan is specified. The tests below were
2 # chosen because they use threads and run in a reasonable amount of time.
3
4 TSAN_TESTS = [
5 'test_asyncio',
6 # TODO: enable more of test_capi once bugs are fixed (GH-116908, GH-116909).
7 'test_capi.test_mem',
8 'test_capi.test_pyatomic',
9 'test_code',
10 'test_ctypes',
11 # 'test_concurrent_futures', # gh-130605: too many data races
12 'test_enum',
13 'test_functools',
14 'test_httpservers',
15 'test_imaplib',
16 'test_importlib',
17 'test_io',
18 'test_logging',
19 'test_opcache',
20 'test_queue',
21 'test_signal',
22 'test_socket',
23 'test_sqlite3',
24 'test_ssl',
25 'test_syslog',
26 'test_thread',
27 'test_thread_local_bytecode',
28 'test_threadedtempfile',
29 'test_threading',
30 'test_threading_local',
31 'test_threadsignals',
32 'test_weakref',
33 'test_free_threading',
34 ]
35
36 # Tests that should be run with `--parallel-threads=N` under TSAN. These tests
37 # typically do not use threads, but are run multiple times in parallel by
38 # the regression test runner with the `--parallel-threads` option enabled.
39 TSAN_PARALLEL_TESTS = [
40 'test_abc',
41 'test_hashlib',
42 ]
43
44
45 def setup_tsan_tests(cmdline_args) -> None:
46 if not cmdline_args:
47 cmdline_args[:] = TSAN_TESTS[:]
48
49 def setup_tsan_parallel_tests(cmdline_args) -> None:
50 if not cmdline_args:
51 cmdline_args[:] = TSAN_PARALLEL_TESTS[:]