Skip to content

run-workbench: reach our anxnet.device, and check it is what was staged - #135

Merged
tinic merged 5 commits into
mainfrom
fix/run-workbench-anxnet
Oct 1, 2026
Merged

tinic merged 5 commits into
mainfrom
fix/run-workbench-anxnet

Conversation

@tinic

@tinic tinic commented Oct 1, 2026

Copy link
Copy Markdown
Owner

install/test/run-workbench.sh could not exercise our own anxnet.device (re-implementation of codex's reviewed b23fc4de/3252c4c6, which could not be pushed from its responder):

  1. AMINETXDUO_SANA2_VENDOR="${…:-1}" mapped empty to 1, so anxnet was unreachable; now ${…-1} (unset = vendor, empty = anxnet), comment corrected, and in the SAME commit the a2065 vendor-driver injection requires a non-empty VENDOR (else anxnet would be "selected" with vendor bytes).
  2. With SANA2_SEL_SOURCE=anxnet, export the full set before _sana2_names (DRIVER_NAME=anxnet.device, DIR=Networks, DEVICE, CARD), as tools/classicwb.sh does; vendor runs export none, so they keep their own names.
  3. Generic CARD_SELECTED accepts AmiNetXDuo:Devs/Networks/$SANA2_DRIVER (the installer: name a drawer install's drivers through AmiNetXDuo: #127 drawer form), no glob.
  4. Staged-byte guard, keyed on SANA2_SEL_SOURCE=anxnet: staged sha256 must equal the archive's Devs/Networks/anxnet.device; fails closed.
  5. The stale anxnet.device fixture no longer overwrites a staged anxnet driver; backup checks still apply.

Selection proof (the real block + tools/sana2-stage.sh, fixture drivers): empty VENDOR → source=anxnet staged=DEVS:Networks/anxnet.device bytes=OUR-anxnet for ne2000_pcmcia, ariadne2, a2065; unset/0 → vendor bytes and names, nothing exported. origin/main: source=vendor for all empty rows. check-harnesses PASS, shellcheck 0.

End-to-end drawer run (AMINETXDUO_SANA2_VENDOR= … -D -l AVERAGE -N ariadne2 -B) follows on the rig.

🤖 Generated with Claude Code

tinic and others added 4 commits October 1, 2026 08:19
AMINETXDUO_SANA2_VENDOR used ${:-1}, so an empty value could never
select anxnet.device; it is now ${-1}: unset means vendor, empty means
anxnet.  The A2065 vendor-driver injection is gated on a non-empty
VENDOR so an anxnet run on that board does not stage Commodore's bytes.

An anxnet run exports DRIVER_NAME/DIR/DEVICE/CARD before _sana2_names,
as tools/classicwb.sh does, so the bytes are staged as anxnet.device and
not under the board's vendor file name.

The staged file's sha256 must equal the archive's anxnet.device whenever
sana2_select chose anxnet; the run fails closed otherwise.

The stale anxnet.device fixture no longer overwrites a staged anxnet
driver: that file stands in as the existing driver, and only the
"live file differs from the stale one" check is skipped for it.

The generic CARD_SELECTED match accepts the drawer-install form
AmiNetXDuo:Devs/Networks/<driver>.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The bridge lock skips SLIRP and run-workbench.sh took it about 660
lines below its HD/WORK wipe, so a second run of one tag in one
checkout deleted the live guest's drive and then waited.

tools/emu-rig-lock.sh gains rig_claim_drive/rig_drop_drive: an
exclusive flock beside the bridge lock, keyed by the cksum of the
drive's resolved path (the path is in the holder record), blocking up
to AMINETXDUO_DRIVE_WAIT (1800 s) then 6, 2 when it cannot arbitrate.
Two checkouts with one tag are two drives and stay parallel.

Every launcher that starts the emulator claims its drive before its
first wipe, restage, Xvfb, tcpdump or emulator start: amiberry-run.sh,
run-workbench.sh, run-nfsmount.sh, run-smbmount.sh, run-console.sh,
run-wbgrab.sh, and the standing classicwb.sh, demo-rtg.sh and
console-instance.sh (wait 0: refused at once).  One lock order
everywhere, drive before bridge; the standing check never waits.
Helpers that are not the guest drop the drive lock with the others.

bridge-lock-selftest.sh adds drive_serial, drive_parallel,
drive_refuse, lock_order_live (four contenders over two tags and two
backends finish inside the bound) and launcher_order, which finds
every script that starts the emulator and fails one with no drive
claim, a claim after its first destructive line, or bridge before
drive.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rig_claim_drive takes the backend as its third argument.  With no
flock(1) a non-bridged run gets one warning ("no flock: drive <path>
not locked; do not run two of this tag at once") and 0, unlocked; a
bridged one still exits 2.  Every caller passes its backend
(run-wbgrab.sh passes none); run-workbench.sh claims the drive once
the backend is known, still before its first destructive line.
Standing launchers are unchanged: rig_standing_exempt still requires
flock(1) ahead of the drive claim.

bridge-lock-selftest.sh: noflock_drive, with flock(1) off PATH the
function returns 0 with the warning for slirp and 2 for ens18, and a
SLIRP amiberry-run.sh gets past the drive with the warning.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An anxnet run stages anxnet.device and no vendor file, so the
Installer's driver-file fallback preselects nothing.  The install boot
had no board, so InstallNetProbe found nothing either: the card page
came up with every box clear, installdrive pressed Proceed, the script
answered "Select at least one network device." and the pair repeated
until the timeout (ariadne2 drawer AVERAGE run at 24ade38, ~140 clicks,
status 20).  Boot the install with the board, as -M already does, so the
probe preselects it.  NO_CARD keeps its board-less boot.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comment thread tools/emu-rig-lock.sh
Comment on lines +433 to +435
( umask 000; : >> "$f" ) 2> /dev/null || {
echo "cannot create the drive lock $f" >&2; return 2; }
exec {fd}>>"$f" || { echo "cannot open the drive lock $f" >&2; return 2; }
The drawer arm installs twice and marks S:Network-Startup between the
runs; a boot-disabled install writes no S:Network-Startup, so the mark
fails and the run ends at status 20 after a correct install.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tinic
tinic merged commit 045ea1e into main Oct 1, 2026
78 of 80 checks passed
@tinic
tinic deleted the fix/run-workbench-anxnet branch October 1, 2026 16:47
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.

2 participants