The three reference FAT12 images under
core/src/testFixtures/resources/golden/ are used by Fat12FormatterTest to
byte-validate this engine's Fat12Formatter output against mkfs.fat (claim C-C,
mkfs.fat golden conformance). They are committed as read-only inputs; they are not
regenerated by the build.
Generated with dosfstools 4.2 (mkfs.fat / fsck.fat 4.2, 4.2-1.2build1 on Ubuntu
24.04). The CI workflow installs dosfstools on ubuntu-latest (also 4.2) and asserts
mkfs.fat --version reports 4.2 so the conformance baseline cannot silently drift to a
different upstream. The committed images are not regenerated by default — they are
authentic 4.2 output, verified reproducible (below).
Each image is created with mkfs.fat -F 12, a pinned volume serial (-i), and a pinned
label (-n). mkfs.fat 4.2 stamps the volume-label directory entry with a creation
timestamp; to make the output byte-for-byte reproducible, pin it with
SOURCE_DATE_EPOCH (the committed images were stamped 2026-06-08 19:39:04 UTC):
export SOURCE_DATE_EPOCH=1780947544 # 2026-06-08 19:39:04 UTC
mkfs.fat -F 12 -n "TEST1440K" -i a58bab35 -C fat12_1440k_empty.img 1440
mkfs.fat -F 12 -n "TEST720K" -i a58bc8c6 -C fat12_720k_empty.img 720
mkfs.fat -F 12 -n "TEST360K" -i a58bded5 -C fat12_360k_empty.img 360-C <file> <N>creates<file>ofN × 1024bytes (1440/720/360 KiB), then writes the filesystem into it.-i <volid>pins the 32-bit volume serial (otherwise random per run).SOURCE_DATE_EPOCHpins the label-entry timestamp. Without it, regenerated images are identical to the committed goldens except for 7 timestamp bytes in the volume-label root-directory entry. With it, regeneration is byte-for-byte identical (cmpreports no difference) under dosfstools 4.2.
Each committed image was confirmed fsck.fat -n-clean (exit 0, no warnings).
| File | Size | Geometry |
|---|---|---|
core/src/testFixtures/resources/golden/fat12_1440k_empty.img |
1 474 560 B | 1.44 MB floppy |
core/src/testFixtures/resources/golden/fat12_720k_empty.img |
737 280 B | 720 KB floppy |
core/src/testFixtures/resources/golden/fat12_360k_empty.img |
368 640 B | 360 KB floppy |
Fat12FormatterTest byte-compares the engine's formatter output against these images.
Separately from the golden byte-comparison, CI runs an independent dosfstools oracle:
./gradlew :core:fsckEmit writes two engine-produced images
(core/build/fsck/fresh.img, core/build/fsck/ops.img) and CI runs fsck.fat -n on both
(both must exit 0). This validates the engine's writes against a real third-party FAT
checker rather than against mkfs.fat output — a non-circular conformance signal.