◐ Shell
clean mode source ↗

GH-120754: Add a strace helper and test set of syscalls for open().read() by cmaloney · Pull Request #121143 · python/cpython

added 3 commits

June 28, 2024 19:50
The test explicitly wants to check for `vfork` call _or_ flag passed to
clone so keep doing the regex search rather than looking at particular
events
Goal is that as changes to I/O code are made changes to the set of
system calls made need to be intentional so that common fast-paths
aren't accidentally changed.

@cmaloney

Running on my dev machine, ArchLinux, get fstat while Ubuntu CI machine
finds newfstatat

@cmaloney

@cmaloney

@cmaloney

@cmaloney

@cmaloney cmaloney marked this pull request as ready for review

June 29, 2024 09:10

gpshead

@cmaloney

hauntsaninja

hauntsaninja added a commit to hauntsaninja/cpython that referenced this pull request

Aug 24, 2024

@cmaloney cmaloney deleted the cmaloney/systrace_helper_wip branch

August 25, 2024 04:18

@cmaloney cmaloney restored the cmaloney/systrace_helper_wip branch

August 25, 2024 04:18

cmaloney added a commit to cmaloney/cpython that referenced this pull request

Aug 28, 2024
NOTE: This needs a full buildbot test pass before merge, see: python#121143 (comment).

1. Added `statx` to set of allowed syscall forms (Should make Raspian bot pass).
2. Check that the `fd` returned from `open` is passed to all future calls. This helps ensure things like the `stat` call uses the file descriptor rather than the `filename` to avoid TOCTOU isuses.
3. Update the `Path().read_bytes()` test case to additionally validate the reduction in`isatty`/`ioctl` + `seek` calls from python#122111
4. Better diagnostic assertion messagess from @gpshead, so when the test fails have first information immediately available. Makes remote CI debugging much simpler.

@cmaloney cmaloney deleted the cmaloney/systrace_helper_wip branch

November 2, 2024 03:17