Skip to content

Display header when running python -m test --tsan - #162249

Open
vstinner wants to merge 1 commit into
python:mainfrom
vstinner:want_header
Open

vstinner wants to merge 1 commit into
python:mainfrom
vstinner:want_header

Conversation

@vstinner

Copy link
Copy Markdown
Member

When running "python -m test" with --pgo, --tsan or --tsan-parallel, display the test header.

When running "python -m test" with --pgo, --tsan or --tsan-parallel,
display the test header.
@vstinner
vstinner marked this pull request as ready for review November 19, 2026 00:05
@vstinner

Copy link
Copy Markdown
Member Author

One of my motivations for this change is to log "xSAN_OPTIONS" environment variable, to reproduce more easily tests locally. See == TSAN_OPTIONS='...' below.

TSan CI displays the header as expected: https://github.com/python/cpython/actions/runs/44426187955/job/135231686260

Run ./python -m test --tsan -j4 -W --timeout=900 --slowest
== CPython 3.16.0a2+dev (remotes/pull/162249/merge:4e35ea6, Nov 19 2026, 00:09:15) [Clang 21.1.8 (6ubuntu1)]
== Linux-7.0.0-1019-azure-x86_64-with-glibc2.43 little-endian
== Python build: debug TSAN
== cwd: /home/runner/work/cpython/cpython/build/test_python_worker_12272æ
== CPU count: 4
== encodings: locale=FS=utf-8
== resources: all test resources are disabled, use -u option to unskip tests
== sanitizers: thread
== TSAN_OPTIONS='log_path=/home/runner/work/cpython/cpython/san_log suppressions=/home/runner/work/cpython/cpython/Tools/tsan/suppressions.txt handle_segv=0'

Using random seed: 2281907138
0:00:00 load avg: 3.84 mem:  106.7 MiB Run 141 tests in parallel using 4 worker processes (timeout: 15 min, worker timeout: 20 min)

Sanitizers / TSan (free-threading) CI displays the header as well on the "Parallel tests":

Run ./python -m test --tsan-parallel --parallel-threads=4 -j4 -W --timeout=600 --slowest
== CPython 3.16.0a2+dev free-threading build (remotes/pull/162249/merge:4e35ea6, Nov 19 2026, 00:08:52) [Clang 21.1.8 (6ubuntu1)]
== Linux-7.0.0-1019-azure-x86_64-with-glibc2.43 little-endian
== Python build: free_threading debug TSAN
== cwd: /home/runner/work/cpython/cpython/build/test_python_worker_37020æ
== CPU count: 4
== encodings: locale=FS=utf-8
== resources: all test resources are disabled, use -u option to unskip tests
== sanitizers: thread
== TSAN_OPTIONS='log_path=/home/runner/work/cpython/cpython/san_log suppressions=/home/runner/work/cpython/cpython/Tools/tsan/suppressions_free_threading.txt handle_segv=0'

Using random seed: 1615053906
0:00:00 load avg: 2.62 mem:  282.2 MiB Run 2 tests in parallel using 2 worker processes (timeout: 10 min, worker timeout: 15 min)

@vstinner

Copy link
Copy Markdown
Member Author

!buildbot aarch64 CentOS10 LTO + PGO

@bedevere-bot

Copy link
Copy Markdown

The regex 'aarch64 CentOS10 LTO + PGO' did not match any buildbot builder. Is the requested builder in the list of stable builders?

@vstinner

Copy link
Copy Markdown
Member Author

!buildbot aarch64 CentOS10 LTO + PGO

@bedevere-bot

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @vstinner for commit a9baac7 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F162249%2Fmerge

The command will test the builders whose names match following regular expression: aarch64 CentOS10 LTO \+ PGO

The builders matched are:

  • aarch64 CentOS10 LTO + PGO PR

@vstinner

Copy link
Copy Markdown
Member Author

!buildbot AMD64 Fedora Stable LTO + PGO

@bedevere-bot

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @vstinner for commit a9baac7 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F162249%2Fmerge

The command will test the builders whose names match following regular expression: AMD64 Fedora Stable LTO \+ PGO

The builders matched are:

  • AMD64 Fedora Stable LTO + PGO PR

@vstinner

Copy link
Copy Markdown
Member Author

I built Python locally with PGO using ./configure --enable-optimizations && make.

PGO tests log the test header:

./python -m test --pgo --timeout=
== CPython 3.16.0a2+dev (heads/want_header:a9baac70636, Nov 19 2026, 01:57:55) [GCC 16.2.1 20261029 (Red Hat 16.2.1-3)]
== Linux-7.3.4-300.fc45.x86_64-x86_64-with-glibc2.44 little-endian
== Python build: release
== cwd: /home/vstinner/python/main/build/test_python_worker_952092æ
== CPU count: 12
== encodings: locale=FS=utf-8
== resources: all test resources are disabled, use -u option to unskip tests

Using random seed: 521703923
0:00:00 load avg: 11.47 Run 43 tests sequentially in a single process

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants