Skip to content

tools: winuae-run.sh claims its drive; launcher_order covers WinUAE - #137

Closed
tinic wants to merge 2 commits into
mainfrom
fix/winuae-drive-lock
Closed

tinic wants to merge 2 commits into
mainfrom
fix/winuae-drive-lock

Conversation

@tinic

@tinic tinic commented Oct 1, 2026

Copy link
Copy Markdown
Owner

Closes the two #135 review follow-ups (deepseek-flash).

  1. tools/winuae-run.sh now calls rig_claim_drive "$HD" ... none right after HD is set, before the ROM push and the first rm -rf "$HD". It does not claim the bridge, because WinUAE's network (bridged or SLIRP) is on the Windows host and this host's locks do not cover it. So the backend is none: on a host without flock(1) the claim warns and carries on instead of refusing.
  2. launcher_order in tools/bridge-lock-selftest.sh:
    • takes emulator start lines from an EMU_START table (amiberry, winuae). Discovery is the union of the rows.
    • asserts drive < emulator start for every launcher, bridged or not.
    • asserts drive < first destructive line. Lines run through ssh act on the remote host and are skipped.
    • fails a discovered launcher that has no non-comment start (no-emulator-start).
    • fails if amiberry-run, run-workbench or winuae-run is not discovered (not-discovered).

Tested on playhouse2. No emulator was booted.

  • tools/bridge-lock-selftest.sh printed launcher_winuae-run=drive:177 bridge:none first_destructive:286 emulator:526, launcher_order=ok and bridge_selftest=0.
  • tools/check-harnesses.sh printed check_harnesses=PASS.
  • shellcheck -S warning passed on both files.
  • Bite test, run on a scratch copy:
    • Moving the winuae and classicwb claims below the emulator start and adding a comment-only launcher gave launcher_order=wrong:tests/tools/fake-launcher.sh:no-emulator-start tools/classicwb.sh:drive(1175)>=emulator(425) tools/classicwb.sh:drive(1175)>=destructive(245) tools/winuae-run.sh:drive(525)>=emulator(524) tools/winuae-run.sh:drive(525)>=destructive(284), rc=1.
    • Changing the winuae start line gave launcher_order=wrong:tools/winuae-run.sh:not-discovered, rc=1.

🤖 Generated with Claude Code

tinic and others added 2 commits October 1, 2026 10:00
winuae-run.sh wiped its staging drive (rm -rf "$HD", before staging and
again before the copy back) with no drive claim.  It now claims the drive
right after HD is set, before the ROM push and the first wipe.  Backend is
none: the guest's network, bridged or not, lives on the Windows host, so
there is no local bridge to claim and a host without flock(1) degrades
with a warning rather than refusing.

bridge-lock-selftest launcher_order:
- emulator start lines come from an EMU_START table (amiberry, winuae);
  discovery is the union of the rows
- drive claim < emulator start is asserted for every launcher, not only
  bridged ones
- drive claim < first destructive line, where lines run through ssh act
  on the remote host and are skipped
- a discovered launcher with no non-comment start fails
  (no-emulator-start); amiberry-run, run-workbench and winuae-run must be
  discovered (not-discovered otherwise)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An omitted or empty backend read as unbridged, so a caller that forgot it
got the no-flock warning and an unlocked drive.  It now returns 2; every
caller already passes one.  noflock_drive asserts the refusal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tinic tinic closed this Oct 2, 2026
@tinic
tinic deleted the fix/winuae-drive-lock branch October 2, 2026 23:20
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