Skip to content

Write test executables through child processes - #1184

Merged
JacobStephens2 merged 7 commits into
mainfrom
issue-1110
Oct 23, 2026
Merged

JacobStephens2 merged 7 commits into
mainfrom
issue-1110

Conversation

@JacobStephens2

@JacobStephens2 JacobStephens2 commented Oct 23, 2026 •

Copy link
Copy Markdown
Owner

Summary

 test fixture executable
-  fs::write / fs::copy in a parallel test process
+  shared write_executable / copy_executable in a child process

Closes #1110

Test seams

  • Existing CLI, printed installer, PATH fake, Git hook, and executable replacement tests.
  • Concurrent repetitions of the complete console_install integration test binary.

Evidence

  • Before: 50 repetitions of cargo test --test console_install, four
    concurrent: 46 passed, 4 failed with ExecutableFileBusy: Text file busy
    (repetitions 3, 6, 31 and 46; 22.92 seconds).
    After: the same 50 repetitions at e4923c7 all passed (60.80
    seconds while the full suites were also running). The first implementation
    also passed 50/50 in 28.45 seconds.
  • cargo clippy --all-targets -- -D warnings and cargo fmt --check passed on
    final HEAD bac9e7e.
  • macOS CI caught an import used only by Linux setup tests; bac9e7e gives the
    import the same Linux guard. The updated macOS gate passed. Final-commit Linux
    Rust, site, Console and release build checks also passed in
    GitHub checks.
  • /usr/bin/time -p scripts/affected-tests main passed: 2,417 Rust tests passed,
    56 skipped. Wall time: 2,142.21 seconds, including compilation and build-lock
    waits while other validation was running.
  • /usr/bin/time -p cargo test passed. Wall time: 2,188.79 seconds, including
    compilation (23.17 seconds) and build-lock waits. Both local full-suite runs
    overlapped on this shared host.

Review coverage

Independent Standards and Spec reviews against main read all 19 changed files,
including fresh final reviews through bac9e7e. Standards' one initial optional
Duplicated Code finding was addressed by sharing executable copies. Both final
reviews reported no findings.

Changed files left unread: none, on either axis. Generated-output exclusions:
none. Final reports are retained with the Session trace.

Unaddressed findings

Standards

None. The sole finding was addressed in e4923c7.

Spec

None; no findings were reported.

Security

None. Focused review of the 3016eda...HEAD diff (test-only: test-support write_executable/copy_executable plus call-site conversions) found no introduced trust-boundary violation. The helper passes the path as a positional shell parameter inside double quotes and the contents over stdin, and copies via cp with no shell, so test-controlled paths and contents cannot inject shell commands; all changed sources are #[cfg(test)] or integration tests, so no production behavior changed. No proof-of-concept test was warranted and none was added.

Security review outcome

No unaddressed introduced findings.

Merge Danger

Door: two-way

Blast Radius: tests

Test fixtures and shared test support. Reverting restores the executable-write
race.

Built with codex · gpt-6.1-sol · xhigh

@JacobStephens2
JacobStephens2 merged commit a20b579 into main Oct 23, 2026
18 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-1110 branch October 23, 2026 22:43
@JacobStephens2 JacobStephens2 mentioned this pull request Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tests that write an executable and then run it fail intermittently with "Text file busy" (seen in console_install)

1 participant