Bug report
Bug description:
What happens
Lib/test/test_perf_profiler.py uses setUp/tearDown to record all perf-*.map files in /tmp at test start, then deletes any new ones at the end.
When tests run in parallel (make -j, CI runners, pytest-xdist), one test deletes map files belonging to another test → race condition.
This causes:
- Flaky test failures
- Leftover
/tmp/perf-*.map files
- Unreliable CI results
What should happen
Each test should only delete the perf-*.map file(s) it created, regardless of other concurrent processes.
CPython versions tested on:
CPython main branch
Operating systems tested on:
No response
Linked PRs
Bug report
Bug description:
What happens
Lib/test/test_perf_profiler.pyusessetUp/tearDownto record allperf-*.mapfiles in/tmpat test start, then deletes any new ones at the end.When tests run in parallel (
make -j, CI runners,pytest-xdist), one test deletes map files belonging to another test → race condition.This causes:
/tmp/perf-*.mapfilesWhat should happen
Each test should only delete the
perf-*.mapfile(s) it created, regardless of other concurrent processes.CPython versions tested on:
CPython main branch
Operating systems tested on:
No response
Linked PRs