test(stick): Artemis grows to fill the stick -- the tests, seen to fail (#92, Task 2) [skip ci]

Plan 2026-10-29-stick-5, Task 2, steps 1-2:
- qemu_session.py: --stick-gib N (the session's copy of the stick extended,
  sparse); modes stick_grow (16 GiB: grown, over 12000000 user blocks, the
  prompt, the first boot's time; the second boot of the same copy not grown
  again; sfdisk --verify clean) and stick_small (4 GiB: under 8 GB, not grown,
  said so).
- kernel/Makefile: STICK_GIB and STICK_FRESH on qemu-stick, for those.
- check_images.sh: the PC stick's and data stick's Artemis BAM sized for the
  256 GiB cap (6144 devblocks).

Before the change: stick_grow FAIL (no growth line, 1137649 user blocks,
sfdisk: the backup GPT not at the end); stick_small FAIL (no line);
check_images.sh FAIL on the two BAM checks only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GE3SDvQn5EoxdGufk84zz2
This commit is contained in:
Claude
2026-11-08 11:54:53 +00:00
parent 4c38a7b1e6
commit 4e935e4825
9 changed files with 566 additions and 4 deletions
+7
View File
@@ -73,6 +73,11 @@ same() { # same IMG N FILE -- partition N holds FILE's bytes, and is exactly i
cmp -s -i "$((s * 512)):0" -n "$((z * 512))" "$1" "$3"
}
# bam IMG N -- the BAM of partition N's Artemis volume, in 4 KiB devblocks (mkartemis --check)
bam() { artemis_check "$1" "$2" 2>/dev/null | sed -n 's/.* bam \([0-9]*\) .*/\1/p'; }
# the BAM sized for the 256 GiB growth cap (plan 2026-10-29-stick-5, R1): choose_B of 2^26 devblocks
CAP_BAM=6144
uuid() { artemis_check "$1" "$2" 2>/dev/null | sed -n 's/.*disk_uuid \([0-9a-f]*\).*/\1/p'; }
echo "== building"
@@ -95,6 +100,7 @@ check "the ESP holds startup.nsh" mdir -i "$STICK@@$OFF" ::/startup.nsh
check "starforth.cfg's first word is system=v4" eq "$(mtype -i "$STICK@@$OFF" ::/starforth.cfg 2>/dev/null | awk '{print $1; exit}')" "system=v4"
check "the identity partition is all zeros" zeros "$STICK" 2
check "Artemis: STFR v2, signature ok" artemis_check "$STICK" 3
check "Artemis: its BAM sized for 256 GiB ($CAP_BAM devblocks)" eq "$(bam "$STICK" 3)" "$CAP_BAM"
echo "== the data stick ($DATA)"
check "it exists, 1536 MiB" eq "$(stat -c %s "$DATA" 2>/dev/null)" "$((1536 * 1048576))"
@@ -105,6 +111,7 @@ check "whole MiB, contiguous, Artemis to the end" geometry "$DATA"
check "sfdisk --verify: the GPT is clean" sfdisk --verify "$DATA"
check "the identity partition is all zeros" zeros "$DATA" 1
check "Artemis: STFR v2, signature ok" artemis_check "$DATA" 2
check "Artemis: its BAM sized for 256 GiB ($CAP_BAM devblocks)" eq "$(bam "$DATA" 2)" "$CAP_BAM"
U1=$(uuid "$DATA" 2)
check "the data stick builds again" make -f kernel/Makefile ARCH=amd64 datastick
U2=$(uuid "$DATA" 2)