-
-
Notifications
You must be signed in to change notification settings - Fork 33.5k
Description
Bug report
Bug description:
The test file Lib/test/test_perf_profiler.py is fundamentally non-portable because it hardcodes the /tmp/ directory for all perf-*.map file operations.
This is visible in multiple places, such as:
_cleanup_perf_map(self, pid): unlink(f"/tmp/perf-{pid}.map")
test_trampoline_works: perf_file = pathlib.Path(f"/tmp/perf-{process.pid}.map")
test_trampoline_works_with_forks: perf_file = pathlib.Path(f"/tmp/perf-{process.pid}.map")
This reliance on a hardcoded, Unix-specific path causes two major problems:
Guaranteed Failure on Windows: The test module is completely inoperable on Windows, as this directory does not exist.
Test Coverage Gap: This leaves a significant gap in test coverage, as we cannot validate the perf trampoline features on the Windows platform.
CPython versions tested on:
CPython main branch
Operating systems tested on:
No response