Skip to content

Tests: start a just-copied program again while Linux says it is busy - #7

Merged
barath-dev merged 1 commit into
mainfrom
fix-text-file-busy
Nov 23, 2026
Merged

barath-dev merged 1 commit into
mainfrom
fix-text-file-busy

Conversation

@barath-dev

Copy link
Copy Markdown
Owner

CI on main failed on Ubuntu after #6 was merged (run 45153565877): codex_sessions_beside_claude_code panicked at tests/e2e.rs:521 with Text file busy (ETXTBSY).

Cause: the test copies the fake program into place as codex and starts it straight away. Tests run in parallel threads; a process another test starts during the copy inherits the new file's write handle until it runs its own program, and Linux refuses to run a file open for writing. A test-only race, there since 2.8.0.

Fix: a spawn_copied helper tries again for up to two seconds while the file is busy, and that test uses it. The other copies of the fake program (claude, zed) are only run later, by Paddock, well after the copy.

Checked: clippy clean; all tests pass; the Codex test 5 times in a row.

🤖 Generated with Claude Code

https://claude.ai/code/session_013DS9XhJVN73JGnZEqrX89o

codex_sessions_beside_claude_code copies the fake program into place as
codex and starts it at once. On Linux a process another test starts during
the copy holds the new file open for writing until it runs its own
program, and starting the copy then fails with "Text file busy". It did on
Ubuntu CI after #6 was merged. The test now tries again for up to two
seconds while the file is busy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013DS9XhJVN73JGnZEqrX89o
@barath-dev
barath-dev merged commit 015177b into main Nov 23, 2026
6 checks passed
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.

1 participant