Repository navigation
tests: attribute scratch-file creations to the test's own process tree - #560
Closed
luisleo526 wants to merge 4 commits into
Closed
luisleo526 wants to merge 4 commits into
luisleo526 wants to merge 4 commits into
Conversation
…e and print the creator pid test_default_scratch_tmpfs_tmpdir failed on a shared CI VM when another runner's job created pineforge-* names in a shared temp root. At this base the default test already uses a private TMPDIR and checks its own mkstemp descriptors, but the witness (a) dropped creations by the test's fork descendants, (b) ignored exclusive opens outside the private TMPDIR and (c) printed paths without any creator identity, so a false positive could not be diagnosed from the log. - The witness is an anonymous shared mapping inherited by fork descendants: creation path and creator pid are recorded by the interposed mkstemp and O_CREAT|O_EXCL open, after checking the returned descriptor's own /proc/self/fd name. No named file or endpoint a stranger could write to. - Failures print path and pid, or "pid=unattributable" with the reason when only inotify saw it (inotify supplies no creator pid). Overflow, truncation and incomplete publication fail instead of reading as "nothing created". - The three co-tenant rows now fork+exec a separate shell helper before the watches exist (released over a pipe once armed), creating names in /tmp, /dev/shm and /var/tmp. - New rows: own exclusive open in /tmp is detected with path and pid, own fork descendant's creations are detected and attributed, diagnostics contain path+pid and the unattributable reason. - scripts/ci_verify.py / test_ci_verify.py and docs/ci.md: row-count accounting for the three added public rows. No engine source or public header changes. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…nd docs Comment and documentation wording only: six added lines named a tracking id. They now describe the change in plain words. No code, no count and no line position changes. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Printed text only: the scratch lstat line began with an internal tag. It now reads "owned scratch lstat: ...". Nothing parses that line and no code path changes. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Collaborator
Author
|
Closing: this change is being remade as one clean commit on the current main (each commit's message must name the sentences it removes), and will be opened as a new PR. |
Collaborator
Author
|
Superseded by #584. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
tests: attribute scratch-file creations to the test's own process tree and print the creator pid
test_default_scratch_tmpfs_tmpdir failed on a shared CI VM when another runner's
job created pineforge-* names in a shared temp root. At this base the default
test already uses a private TMPDIR and checks its own mkstemp descriptors, but
the witness (a) dropped creations by the test's fork descendants, (b) ignored
exclusive opens outside the private TMPDIR and (c) printed paths without any
creator identity, so a false positive could not be diagnosed from the log.
creation path and creator pid are recorded by the interposed mkstemp and
O_CREAT|O_EXCL open, after checking the returned descriptor's own
/proc/self/fd name. No named file or endpoint a stranger could write to.
only inotify saw it (inotify supplies no creator pid). Overflow, truncation
and incomplete publication fail instead of reading as "nothing created".
watches exist (released over a pipe once armed), creating names in /tmp,
/dev/shm and /var/tmp.
descendant's creations are detected and attributed, diagnostics contain
path+pid and the unattributable reason.
accounting for the three added public rows.
No engine source or public header changes.
🤖 Generated with Claude Code