Skip to content

kicad install: a program still open for writing elsewhere is waited for, not taken as no answer (the a_stopped_download test's race) - #1517

Merged
i2cjak merged 2 commits into
mainfrom
fix/install-test-etxtbsy
Nov 21, 2026
Merged

i2cjak merged 2 commits into
mainfrom
fix/install-test-etxtbsy

Conversation

@i2cjak

@i2cjak i2cjak commented Nov 20, 2026

Copy link
Copy Markdown
Collaborator

kicad install: a program still open for writing elsewhere is waited for, not taken as no answer (spawn_busy)

The full hub suite failed a_stopped_download_is_kept_said_and_continued once in 4038 (Nov 20, #1470's run) and it passed 3 of 3 alone.
The cause: its stand-in curl, written just before the size is asked, is "Text file busy" while another test thread's fork still holds
it open for writing (the child keeps the descriptor until its own exec). length() took the failed spawn as no size (0), so "(already
downloaded)" was not said. install.rs now spawns through spawn_busy (ETXTBSY waited out, at most 40 x 25 ms, as the installer's spawn
already did and kipc/onboard/accounts_io do): length(), tool() and the installer.

Test: a_program_still_open_for_writing_elsewhere_is_waited_for_not_taken_as_no_answer holds the stand-in open for writing for 150 ms,
deterministically: length() reads the size and tool() runs. Without spawn_busy it fails (left: 0).

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com

Test-only fix for a flake seen in #1470's full hub run. No product behaviour changes, apart from the retry on a spawn that gets "Text file busy".

🤖 Generated with Claude Code

i2cjak and others added 2 commits November 20, 2026 19:05
…or, not taken as no answer (spawn_busy)

The full hub suite failed a_stopped_download_is_kept_said_and_continued once in 4038 (Nov 20, #1470's run) and it passed 3 of 3 alone.
The cause: its stand-in curl, written just before the size is asked, is "Text file busy" while another test thread's fork still holds
it open for writing (the child keeps the descriptor until its own exec). length() took the failed spawn as no size (0), so "(already
downloaded)" was not said. install.rs now spawns through spawn_busy (ETXTBSY waited out, at most 40 x 25 ms, as the installer's spawn
already did and kipc/onboard/accounts_io do): length(), tool() and the installer.

Test: a_program_still_open_for_writing_elsewhere_is_waited_for_not_taken_as_no_answer holds the stand-in open for writing for 150 ms,
deterministically: length() reads the size and tool() runs. Without spawn_busy it fails (left: 0).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…the stand-in 400 ms (it starts before the call on a loaded machine)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@i2cjak
i2cjak force-pushed the fix/install-test-etxtbsy branch from cb35f12 to 2a2da41 Compare November 21, 2026 00:11
@i2cjak
i2cjak merged commit f2a98e2 into main Nov 21, 2026
9 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