Repository navigation
test: write fake git scripts without a held fd - #85
Merged
rolandjitsu merged 1 commit intoNov 24, 2026
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #85 +/- ##
=======================================
Coverage 98.73% 98.73%
=======================================
Files 9 9
Lines 6466 6466
=======================================
Hits 6384 6384
Misses 82 82 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
profiling
force-pushed
the
profiling/fix-e2e-script-etxtbsy
branch
from
November 23, 2026 08:29
e38112b to
cbfbe82
Compare
rolandjitsu
approved these changes
Nov 24, 2026
Owner
|
Needs a rebase, then it should be good to go. |
Writing a script in-process leaves a writable fd that a child forked by a parallel test inherits, so the later exec fails with "Text file busy". Write it through a short-lived sh instead, as the unit tests already do. Assisted-by: Claude:claude-sonnet-5-5
profiling
force-pushed
the
profiling/fix-e2e-script-etxtbsy
branch
from
November 24, 2026 01:49
cbfbe82 to
d924911
Compare
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.
Summary
Fixes the same flaky
Text file busy(ETXTBSY) failure as #81, in the integration tests.tests/e2e.rs,tests/lifecycle.rsandtests/retry.rswrite a fakegitscript with
std::fs::writeand then exec it. Tests run on parallel threads ofone process: a child forked by another test while the writable descriptor is
open inherits it, so the later
execfails with ETXTBSY.helpers::write_test_scriptwrites the script through a short-livedsh, so thisprocess never holds a writable descriptor for it. Six call sites use it (four in
e2e.rs, one each inlifecycle.rsandretry.rs).Verification
The compiled
e2etest binary run in a loop, debug build, default test threads.main)All 26 failures before the change were
Text file busy, inupload_pack_cap_holds_a_slot_until_the_process_exitsandwant_by_sha_tolerates_object_check_failure.lifecycle(4 loops x 100) andretry(4 loops x 8) also pass with 0 failures after the change; I did notmeasure them before it.
cargo fmt --check,cargo clippy -D warningsandcargo test --all-featurespass.
Not in this PR
Under the same stress
client_disconnect_kills_upload_pack_process_groupfailsrarely (about 1 in 800 runs of that test, also on
main) at itsprocess_aliveassertion. It is unrelated to script writing and is left for a separate change.
Generated with Claude Code