This repo currently has two testing layers:
- top-level AmiFuse integration and smoke tests
amitoolsunit /pytask/ Amiga-side regression tests in the submodule
PERFORMANCE.md records timing policy and current benchmark tables.
It is not the main "how do I run the tests?" document. This file is.
Top-level AmiFuse tests use images and drivers from:
~/AmigaOS/AmiFuse/
That directory is outside the repo on purpose. The fixture tree is now split into:
~/AmigaOS/AmiFuse/drivers/~/AmigaOS/AmiFuse/fixtures/readonly/~/AmigaOS/AmiFuse/fixtures/downloaded/~/AmigaOS/AmiFuse/generated/~/AmigaOS/AmiFuse/bench/~/AmigaOS/AmiFuse/tmp/~/AmigaOS/AmiFuse/src/
New scratch and generated images should live under:
~/AmigaOS/AmiFuse/generated/
Current canonical fixture set used by the matrix:
fixtures/readonly/pfs.hdfwithdrivers/pfs3aiofixtures/readonly/sfs.hdfwithdrivers/SmartFilesystemfixtures/readonly/Default.hdfwithdrivers/FastFileSystemfixtures/readonly/ofs.adfwithdrivers/FastFileSystemfixtures/downloaded/netbsdamiga92.hdfwithdrivers/BFFSFilesystemfixtures/readonly/AmigaOS3.2CD.isowithdrivers/CDFileSystem
The BFFS NetBSD fixture is fetched on demand from the compressed
aminet payload if
fixtures/downloaded/netbsdamiga92.hdf is missing.
fixtures/readonly/Default.hdf is also fetched on demand from the
compressed Google Drive upload if it is missing.
Additional explicit smoke coverage:
fixtures/readonly/AmigaOS3.2CD.isowith~/git/xcdfs/build/amiga/ODFileSystem
Fastest high-signal top-level checks:
python3 tools/amifuse_matrix.py
python3 tools/readme_smoke.py
python3 tools/image_format_smoke.pyIf these pass, the current read-only matrix, documented CLI examples, and image-format smoke coverage are working.
Run:
python3 tools/amifuse_matrix.pyWhat it covers:
- image inspect
- handler startup
- root listing
- one known-path lookup
- one small-file read
- one larger-file read
- flush / shutdown path
Default fixtures:
pfs3sfsffsofsbffscdfs
Dedicated explicit fixture:
odfs
Output modes:
- default: markdown table
--json: machine-readable result objects
Useful options:
python3 tools/amifuse_matrix.py --fixtures pfs3 sfs
python3 tools/amifuse_matrix.py --fixtures odfs
python3 tools/amifuse_matrix.py --runs 1
python3 tools/amifuse_matrix.py --timeout 120
python3 tools/amifuse_matrix.py --jsonHow to read failures:
inspectfailure usually means image detection or partition parsinginitfailure usually means handler startup or bootstrap brokeroot/stat/small/largefailures usually mean filesystem packet handling or read-path regressions- timeout means the worker never reached completion and usually points to a stuck handler loop or missing reply
Run:
python3 tools/amifuse_matrix.py \
--fixtures ofs-rw ffs-rw pfs3-rw sfs-rw \
--runs 3What it adds beyond read-only smoke:
mkdir- file create
- write
- rename
- remount
- post-remount verify
- delete
These tests use scratch copies under:
~/AmigaOS/AmiFuse/generated/
They should not mutate the canonical seed fixtures.
Run:
python3 tools/amifuse_matrix.py \
--fixtures ofs-fmt ffs-fmt pfs3-fmt sfs-fmt \
--runs 3What it covers:
- create a fresh image
- create an RDB
- add the target partition
- format the filesystem through AmiFuse
- mount it read-write
- run writable smoke
- remount and verify
These are the best regression tests for post-format behavior.
Run:
python3 tools/amifuse_matrix.py --fixtures pfs3-4g --runs 1 --json
python3 tools/amifuse_matrix.py --fixtures pfs3-part-4g --runs 1 --jsonWhat it covers:
- sparse image larger than
4GiB - partition starting beyond the
4GiBboundary - partition whose filesystem itself spans more than
4GiB - format, write, remount, read-back, cleanup
This is not part of the default matrix because it is slower and creates an ephemeral multi-gigabyte image.
Current limitation:
- the large-partition case verifies format and normal file I/O on a
>4GiBpartition - it does not yet verify file offsets beyond
4GiBthrough DOS handle APIs, because the current seek/setsize packet path is still32-bit
Run:
python3 tools/readme_smoke.pyor:
make example-smokeWhat it covers:
amifuse inspectamifuse inspect --fullrdb-inspectrdb-inspect --fullrdb-inspect --jsonrdb-inspect --extract-fsdriver-info- documented mount examples through a fake FUSE shim
This does not require a live FUSE mount. It is intended to catch documentation drift and bootstrap-path regressions.
The README runner now uses the reorganized fixture layout under
drivers/, fixtures/readonly/, and generated/.
Run:
python3 tools/image_format_smoke.pyor:
make image-format-smokeWhat it covers:
- direct
RDB/HDF ADFISO 9660- Emu68-style
MBR+RDB - Parceiro-style
MBR+RDB
The runner verifies both:
- image detection / inspect path
- mount bootstrap path through
mount_fuse()
It uses a fake FUSE shim, so it exercises the real AmiFuse startup path without requiring a live OS mount.
Use:
python3 tools/amifuse_matrix.py
python3 tools/amifuse_matrix.py \
--fixtures ofs-rw ffs-rw pfs3-rw sfs-rw \
--runs 3
python3 tools/amifuse_matrix.py \
--fixtures ofs-fmt ffs-fmt pfs3-fmt sfs-fmt \
--runs 3Then compare the results with:
Important interpretation rules:
- only compare like-for-like fixture recipes
- prefer
min / median / maxover single samples - very small timings are noisy; do not overreact to one bad run
- the historical
PFSbaseline for this rebased line is0.6s
There is also an older focused benchmark:
make bench-pfsThat compares this checkout to another checkout and is still useful, but the matrix is the main current performance harness.
The amitools submodule has its own test tree and README:
The important buckets there are:
test/unittest/pytasktest/suite
Typical runs from the submodule root:
cd amitools
python3 -m pytest -q test/unit
python3 -m pytest -q test/pytask
python3 -m pytest -q --auto-build --flavor gcc test/suiteNotes:
pytestis required- some suite tests build Amiga binaries first
- compiler-dependent failures may be toolchain issues, not runtime regressions in AmiFuse itself
For the rebased amifuse-0.5 work, many compatibility fixes landed with
new amitools tests already. Top-level AmiFuse matrix failures should be
triaged separately from submodule unit/suite failures.
Start with this order:
python3 tools/amifuse_matrix.py --runs 1 --json- rerun only the failing fixture with
--fixtures ... - if it is a writable or format failure, rerun the matching
-rwor-fmtfixture only - if a documented command fails, run
python3 tools/readme_smoke.py - if the failure looks below the AmiFuse boundary, move into
amitoolstests next
In practice:
read-only matrixcatches mount/read regressionswritable matrixcatches packet/write/remount regressionsformat matrixcatches format and post-format regressionsreadme smokecatches CLI and docs driftamitoolstests catch lower-level runtime semantics
The repo has a structured pytest suite under tests/ that runs without
external fixtures or a live FUSE mount.
# all pytest tests (unit + integration, excludes smoke)
pytest tests/ -v --timeout=60
# unit tests only
pytest tests/unit/ -v --timeout=30
# integration tests only (no smoke)
pytest tests/integration/ -v -m "integration and not smoke" --timeout=60Tests are organized into four layers:
| Layer | Directory | What It Covers |
|---|---|---|
| Unit | tests/unit/ |
Pure logic, mocked dependencies, no I/O |
| Integration | tests/integration/ |
Cross-module with committed test fixtures |
| Smoke | tests/integration/ (marker) |
Wrappers for tools/ scripts, external fixtures |
| Legacy | tools/*.py |
Original matrix, readme, and format smoke scripts |
Unit and integration tests use committed fixtures under tests/fixtures/
and can run anywhere (local, CI, fresh clone). Smoke tests require the
external fixture tree at ~/AmigaOS/AmiFuse/ and are skipped when those
paths are absent.
The tests/fixtures/ directory contains small images and handler
binaries checked into the repo:
| Path | Description |
|---|---|
fixtures/images/blank.adf |
Empty ADF floppy image |
fixtures/images/test_ofs.adf |
OFS floppy with known directory tree |
fixtures/images/test_ffs.adf |
FFS floppy with known directory tree |
fixtures/images/pfs3_test.hdf |
PFS3 hard-drive image with test data |
fixtures/images/pfs3_8mb.hdf |
8 MB PFS3 image for write tests |
fixtures/handlers/pfs3aio |
PFS3 handler binary |
fixtures/icons/ |
Reserved for .info icon fixtures (currently empty; icon-parser tests use synthetic data) |
fixtures/generate_adf.py |
Script to regenerate ADF fixtures |
These fixtures are generated once and committed so CI does not need Amiga toolchains or large external downloads.
| Marker | Description |
|---|---|
integration |
Integration tests requiring real fixtures and machine68k |
smoke |
Smoke test wrappers for tools/ scripts (requires external fixtures) |
slow |
Long-running tests |
fuse |
Requires FUSE/WinFSP kernel driver |
windows |
Windows-specific tests |
macos |
macOS-specific tests |
linux |
Linux-specific tests |
GitHub Actions runs on every push to main and on pull requests:
- Unit tests: 3 OS (Ubuntu, macOS, Windows) x 3 Python (3.11, 3.12, 3.13) = 9 jobs
- Integration tests: 3 OS x Python 3.13 = 3 jobs, depends on unit-tests
- Smoke tests: not in CI (require external fixtures)
Workflow file: .github/workflows/ci.yml
The following are still planned, not fully documented as standalone test entry points yet:
- far-end file I/O coverage inside a filesystem that spans a partition
larger than
4GiB - fuller long-run generated benchmark recipes
fixture-layout cleanup for(committed test fixtures now live in~/AmigaOS/AmiFuse/tests/fixtures/; external fixtures still used by smoke tests)