test(stick): the fixed screen's first test, fallback; Task 5's increments in the plan (#92, 5.1) [skip ci]
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GE3SDvQn5EoxdGufk84zz2
This commit is contained in:
+53
-2
@@ -78,6 +78,10 @@ the stick's, plan 2026-10-26-stick-1-screen-and-keyboard.md):
|
||||
written", session ended, headless; replugged: the proxy logs in again
|
||||
zuse_stick_first after a mint on a data stick made in the session, the same copy booted again with
|
||||
her stick on port 1 and the data stick on port 2 (Review Focus 1): she is logged in
|
||||
fallback a mint on a data stick made in the session, then that stick booted alone (plan
|
||||
2026-10-29-stick-5, Task 5): the fixed screen's four lines, no ok> for 30 s, `3 4 + .`
|
||||
typed there not run; her stick added: the prompt; pulled: the screen again; R with no
|
||||
stick offered: the plug-in line, any key stops it, the screen again
|
||||
bam_flush --target qemu-stick --stick-gib 16: an Artemis block changed and SAVE-BUFFERS'd three
|
||||
times, each timed (TIME:); each answers ok within 2 s (#155: it took 5-6 s); then the BAM's bytes on the
|
||||
stick hashed (BAM:), to be the same before and after #155's change
|
||||
@@ -125,7 +129,7 @@ NO_ZUSE_MODES = {"gpt_zuse", "gpt_hotplug", "gpt_foreign", "gpt_bad_crc", "gpt_b
|
||||
"screen_dark_until_login", "screen_console_after_login", "screen_dark_after_logout",
|
||||
"kbd_typeahead", "stick_boot", "stick_v3", "stick_zuse", "screen_boot", "genesis",
|
||||
"stick_genesis", "stick_grow", "stick_small", "bam_flush",
|
||||
"zuse_stick_first"}
|
||||
"zuse_stick_first", "fallback"}
|
||||
label = a.label or f"{a.mode}-{a.arch}"
|
||||
work = os.path.join(ROOT, "build", "qemu-session", label)
|
||||
shutil.rmtree(work, ignore_errors=True)
|
||||
@@ -177,7 +181,7 @@ if a.stick_gib:
|
||||
make_args.append(f"STICK_GIB={a.stick_gib}")
|
||||
if a.mode in ("stick_grow", "stick_small", "bam_flush"):
|
||||
make_args.append("KERNEL_ARGS=--log-level=info") # the blk: disk lines the sizes are read from
|
||||
if a.mode == "zuse_stick_first":
|
||||
if a.mode in ("zuse_stick_first", "fallback"):
|
||||
# a data stick made once into the session's directory: minted on, then booted again
|
||||
dstick = os.path.join(work, "data.img")
|
||||
subprocess.run(["make", "-f", "kernel/Makefile", f"ARCH={a.arch}", "datastick", f"DATASTICK_IMG={dstick}"],
|
||||
@@ -666,6 +670,53 @@ elif m in ("mint_zuse_refuse", "mint_small", "mint_zuse_used", "mint_pull_system
|
||||
check("no genesis on the second boot", count(r"Zuse: genesis minted") == 0)
|
||||
check("no fault", count(r"EXCEPTION|PANIC|panic") == 0)
|
||||
|
||||
elif m == "fallback":
|
||||
SCREEN = [r"Zuse's stick is not here\.", r"Plug it in to log in\.",
|
||||
r"Or plug in another stick and press R to mint a replacement",
|
||||
r"-- the old Zuse stick will stop working\."]
|
||||
img = os.path.join(work, "zuse-real.img")
|
||||
subprocess.run(["truncate", "-s", "600M", img], check=True)
|
||||
check("[zuse@Hera] ok> (the proxy, first boot)", wait_for(PROMPT, 300))
|
||||
type_line("MINT-ZUSE")
|
||||
wait_for(r"MINT-ZUSE: plug in the stick for the real Zuse", 60)
|
||||
add_stick(1, img, 3)
|
||||
wait_for(r"MINT-ZUSE: type YES to write it", 120)
|
||||
type_line("YES")
|
||||
check("the real Zuse minted (first boot)", wait_for(r"Zuse: real Zuse minted onto the second stick", 300))
|
||||
shutdown()
|
||||
print("-- the second boot: the data stick alone", flush=True)
|
||||
boot([x for x in make_args if x != "clean"])
|
||||
check("POST: PASSED (second boot)", wait_for(r"POST: PASSED", 900))
|
||||
shown = all(wait_for(line, 120) for line in SCREEN)
|
||||
check("the fixed screen: its four lines", shown, near=r"Artemis: |Zuse")
|
||||
check("no ok> for 30 s", not wait_for(ANYPROMPT, 30))
|
||||
type_line("3 4 + .")
|
||||
time.sleep(5)
|
||||
c = count(r"Zuse: identity confirmed from attached thumbdrive")
|
||||
add_stick(2, img, 3)
|
||||
check("her stick added: identity confirmed", wait_for(r"Zuse: identity confirmed from attached thumbdrive", 120, c))
|
||||
check("the prompt", wait_for(PROMPT, 60))
|
||||
time.sleep(3)
|
||||
check("what was typed on the screen did not run (no 7)", re.search(r"\b7\s+ok", text()) is None)
|
||||
n = count(PROMPT)
|
||||
type_line("3 4 + .")
|
||||
check("7 ok at her prompt", wait_for(PROMPT, 60, n) and re.search(r"7\s+ok", text()[-400:]) is not None)
|
||||
shots = count(SCREEN[0])
|
||||
qcmd("device_del", id="stickdev2")
|
||||
check("pulled: session ended", wait_for(r"Zuse: session ended -- reattach to re-authenticate", 60))
|
||||
check("pulled: the fixed screen again", wait_for(SCREEN[0], 60, shots))
|
||||
qcmd("blockdev-del", **{"node-name": "stick2"})
|
||||
shots = count(SCREEN[0])
|
||||
p0 = count(r"MINT-ZUSE: plug in the stick for the real Zuse")
|
||||
s.send(b"R")
|
||||
check("R with no stick: the plug-in line", wait_for(r"MINT-ZUSE: plug in the stick for the real Zuse", 60, p0))
|
||||
time.sleep(2)
|
||||
s.send(b"x")
|
||||
check("any key stops it", wait_for(r"MINT-ZUSE: stopped -- nothing written", 60), near=r"MINT-ZUSE")
|
||||
check("the fixed screen again", wait_for(SCREEN[0], 60, shots))
|
||||
check("no ok> on the screen", "ok> " not in text()[text().rfind("Zuse: session ended"):])
|
||||
check("no fault", count(r"EXCEPTION|PANIC|panic") == 0)
|
||||
|
||||
elif m == "mint_zuse":
|
||||
blank = os.path.join(work, "zuse-real.img")
|
||||
subprocess.run(["truncate", "-s", "600M", blank], check=True)
|
||||
|
||||
Reference in New Issue
Block a user