-
-
Notifications
You must be signed in to change notification settings - Fork 33.4k
Open
Labels
testsTests in the Lib/test dirTests in the Lib/test dirtopic-profilingtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
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-*.mapfiles - 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
Metadata
Metadata
Assignees
Labels
testsTests in the Lib/test dirTests in the Lib/test dirtopic-profilingtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error