Repository navigation
vm: set the file-size limit in a child, not in the test process - #983
Open
tannevaled wants to merge 1 commit into
Open
tannevaled wants to merge 1 commit into
tannevaled wants to merge 1 commit into
Conversation
TestAFlushPastTheFileSizeLimitRaises lowered RLIMIT_FSIZE to 4 bytes in the test process itself. The limit is per process, so every file written while it held, by the other tests or by the testing package, was refused too: the arm64 lane of #982 failed with "can't write .../testlog.txt: file too large" after every test had passed. The limited flush now runs in a child copy of the test binary, which reports the class it raised on stdout. Negative control: leaving the child's limit unchanged makes the test fail ("fsize: raised " with no class). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What
TestAFlushPastTheFileSizeLimitRaises, added with #978, loweredRLIMIT_FSIZEto 4 bytes in the test process itself. The limit is per process. While it held, every file written by the other tests, or by thetestingpackage, was refused too.Seen
On the first run of #982, the
arch arm64lane failed afterinternal/vmhad printedPASS:Any pull request can hit it; whether it does depends on timing.
Fix
The limited flush runs in a child copy of the test binary. The child reports the class it raised on stdout, and the parent asserts
Errno::EFBIG. The limit never applies to the process that runs the other tests.Measured
TestAFlushPastTheFileSizeLimitRaisespasses (darwin).fsize: raisedwith no class), so it still detects a flush that does not raise.buildscan --vetpassed under all 19 CI configurations.Refs #982 (its arm64 lane is where this was seen)
Refs #978 (merged; it added the test)
🤖 Generated with Claude Code