Skip to content

tests: run the AmiFUSE integration test on AmiFUSE 1.0 and on amitools 0.10 - #60

Merged
reinauer merged 2 commits into
mainfrom
fix/names-softint-fallback
Nov 27, 2026
Merged

reinauer merged 2 commits into
mainfrom
fix/names-softint-fallback

Conversation

@reinauer

@reinauer reinauer commented Nov 26, 2026 •

Copy link
Copy Markdown
Owner

tests: run the AmiFUSE integration test on AmiFUSE 1.0 and on amitools 0.10

Test changes only. The handler change this PR started with is dropped.

Why the handler change is gone

Since #58 the handler waits for its first packet on a PA_SOFTINT port. AmiFUSE 0.6.0 and 1.0.0 do not serve such a port, so a volume mounted through them is empty. The first version of this PR made the handler check for that and fall back to a signal port.

AmiFUSE on amitools 0.10 has Cause() and serves these ports. The handler on main works through it as it is, so the fallback is not needed. With AmiFUSE 1.0.0 or older the volume stays empty; the README of the test now says so.

First commit: the test script and AmiFUSE 1.0

The test was written for AmiFUSE 0.6 and fails with 1.0 and later whatever the handler does:

  • Detaching: amifuse mount detaches after mounting unless told to stay, and the script took the exit of the process it started for a failed mount. It now passes --interactive.
  • Image lock: AmiFUSE 1.0 locks the image while it is mounted, and the follow-up checks open the image themselves. The script now unmounts before them.
  • Field names: amitools 0.9 names the fields of a DosList entry dol_*; check_cdda_icon.py takes whichever name is there.
  • Interpreter: the check scripts are started with $PYTHON (default python3), for a system where python3 is not the interpreter AmiFUSE is installed for.

Second commit: the checks and amitools 0.10

On amitools 0.10, AmiFUSE sends every packet after the startup packet through amitools' DosPktHandler. HandlerLauncher.send_packet() and its send_* helpers are gone, and the four check scripts stopped with an AttributeError.

  • Sending packets: now in one place, tests/integration/amifuse_compat.py. It uses HandlerBridge._packet() where the launcher has no send_packet(), and the launcher as before where it has. A reply is matched to its packet in every check, not taken as the first or last one that came.
  • Icon check: it looked for the reply to the request it queues during the icon load in poll_replies(), which no longer sees it. Both the launcher and DosPktHandler take replies from the reply port with the port manager's get_msg(), so the check notes the reply there.
  • .gitignore: the checks import a module now, so Python leaves a __pycache__ next to them.
  • README: says which AmiFUSE the handler needs.

Testing

tests/integration/test_amifuse.sh from this branch with the AmigaOS 3.2 CD image. "New" is AmiFUSE 1.0.1.dev34 from its amitools-0.10.0 branch on amitools 0.9.1.dev156, which has Cause() and PA_SOFTINT ports.

Handler AmiFUSE 0.6.0 AmiFUSE 1.0.0 new
1.0 beta4 passes passes passes
main fails: mount did not expose CDVersion fails the same way passes

A pass covers the mount, reading a file, and the assign-prefix, file-handle, audio TOC and icon checks.

On the new AmiFUSE, with the handler from main:

  • make integration-check (generated ISO, logging build): passes.
  • Whole disc: the listing of all 5,490 entries of the AmigaOS 3.2 CD and the contents of 300 files are identical to what 1.0 beta4 gives.
  • The interrupt runs: a logging build prints names stay Latin-1: not safe to load a library now, a line that is only reached after the software interrupt has fired.
  • Names outside ASCII: two test discs list the same as with the handler of the first version of this PR.

Seen along the way, not changed here

With amitools 0.9 and later, AddDosEntry() accepts only nodes made by MakeDosEntry(). The handler builds its volume node itself, so under AmiFUSE 1.0.0 and later the volume is not published and the handler tries again every 100 ms for as long as the disc is mounted. 1.0 beta4 does the same; reading files is not affected.

The integration test was written for AmiFUSE 0.6 and fails with 1.0
whatever the handler does:

- amifuse detaches after mounting unless it is told to stay, and the
  script takes the exit of the process it started for a failed mount.
  Start it with --interactive.
- AmiFUSE 1.0 locks the image while it is mounted. The checks that
  follow open the image themselves, so unmount before them.
- amitools 0.9 names the fields of a DosList entry dol_* and reads a
  pointer with .aptr. check_cdda_icon.py takes whichever is there.

Take the interpreter for the check scripts from PYTHON as well, for a
system where python3 is not the one AmiFUSE is installed for.

With a 1.0 beta4 handler the test passes with AmiFUSE 0.6.0 and with
1.0.0. The handler of this tree shows an empty volume on both: since
cd2f563 it waits for its first packet on a PA_SOFTINT port, which
they do not serve.
AmiFUSE on amitools 0.10 has Cause() and serves PA_SOFTINT ports, so
the handler can be used through it again. The four check scripts
cannot: there every packet after the startup packet goes through
amitools' DosPktHandler, HandlerLauncher's send_packet() and send_*
helpers are gone, and the checks stop with an AttributeError.

Send the packets in one place, amifuse_compat.py: through
HandlerBridge._packet() where the launcher has no send_packet(), and
through the launcher and _run_until_replies() as before where it has.
A reply is now matched to its packet in every check, not taken as the
first or the last one that came.

check_cdda_icon.py looked for the reply to the request it queues
during the icon load in poll_replies(). With DosPktHandler taking the
replies that no longer sees it. Both take a reply from the reply port
with the port manager's get_msg(), so note it there.

The checks import a module now and Python leaves a __pycache__ next
to them: ignore those. The README says which AmiFUSE the handler
needs.

The test passes with AmiFUSE 1.0.1.dev34 on amitools 0.9.1.dev156,
which has those changes, and with a 1.0 beta4 handler on AmiFUSE
0.6.0 and 1.0.0.
@reinauer
reinauer force-pushed the fix/names-softint-fallback branch from 554806f to 609b223 Compare November 27, 2026 01:44
@reinauer reinauer changed the title amiga: see that software interrupts run before relying on one tests: run the AmiFUSE integration test on AmiFUSE 1.0 and on amitools 0.10 Nov 27, 2026
@reinauer
reinauer merged commit 788e84f into main Nov 27, 2026
3 checks passed
@reinauer
reinauer deleted the fix/names-softint-fallback branch November 27, 2026 04:05
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