File: tsan.py

package info (click to toggle)
python3.14 3.14.0~rc1-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 126,824 kB
  • sloc: python: 745,274; ansic: 713,752; xml: 31,250; sh: 5,822; cpp: 4,063; makefile: 1,988; objc: 787; lisp: 502; javascript: 136; asm: 75; csh: 12
file content (51 lines) | stat: -rw-r--r-- 1,435 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Set of tests run by default if --tsan is specified.  The tests below were
# chosen because they use threads and run in a reasonable amount of time.

TSAN_TESTS = [
    'test_asyncio',
    # TODO: enable more of test_capi once bugs are fixed (GH-116908, GH-116909).
    'test_capi.test_mem',
    'test_capi.test_pyatomic',
    'test_code',
    'test_ctypes',
    # 'test_concurrent_futures',  # gh-130605: too many data races
    'test_enum',
    'test_functools',
    'test_httpservers',
    'test_imaplib',
    'test_importlib',
    'test_io',
    'test_logging',
    'test_opcache',
    'test_queue',
    'test_signal',
    'test_socket',
    'test_sqlite3',
    'test_ssl',
    'test_syslog',
    'test_thread',
    'test_thread_local_bytecode',
    'test_threadedtempfile',
    'test_threading',
    'test_threading_local',
    'test_threadsignals',
    'test_weakref',
    'test_free_threading',
]

# Tests that should be run with `--parallel-threads=N` under TSAN. These tests
# typically do not use threads, but are run multiple times in parallel by
# the regression test runner with the `--parallel-threads` option enabled.
TSAN_PARALLEL_TESTS = [
    'test_abc',
    'test_hashlib',
]


def setup_tsan_tests(cmdline_args) -> None:
    if not cmdline_args:
        cmdline_args[:] = TSAN_TESTS[:]

def setup_tsan_parallel_tests(cmdline_args) -> None:
    if not cmdline_args:
        cmdline_args[:] = TSAN_PARALLEL_TESTS[:]