751b9272cb67

add G-06/G-07 cfgstatus VM test; record baseline findings (fmt/doctor/diff/boot)

time
2026-05-29 17:10 UTC · 4 months ago
machine
koh2
parent
5044329f5c35
1 file test/vm/tests/cfgstatus.sh+43 −0
test/vm/tests/cfgstatus.sh+43 −0
@@ -0,0 +1,43 @@1+#!/usr/bin/env sh2+# G-06 (config: check/fmt) + G-07 (status/info/doctor/boot/log/diff) validation,3+# run inside the VM on the current golden (no flakes/formatter needed except fmt,4+# which is expected to surface a missing-tool finding). Creates one extra5+# generation so diff/history have something to compare.6+set -u7+N=/root/nina8+9+echo "KILN_CS_BEGIN"10+11+# Make a 2nd generation so diff/log have content.12+sed -i 's| ./hardware-configuration.nix | ./hardware-configuration.nix ./genmarker.nix |' /etc/nixos/configuration.nix13+printf '{ ... }: { environment.etc."nina-gen".text = "X"; }\n' > /etc/nixos/genmarker.nix14+$N apply >/dev/null 2>&1; echo "setup apply rc=$?"15+16+echo "### G-06 T-082 nina check (valid config; expect :: ok, exit 0)"17+$N check; echo "CHECK_RC=$?"18+19+echo "### G-06 T-084 nina fmt (expect format /etc/nixos/configuration.nix)"20+$N fmt; echo "FMT_RC=$?"21+22+echo "### G-06 T-085 nina fmt --check (expect ok after fmt)"23+$N fmt --check; echo "FMTCHK_RC=$?"24+25+echo "### G-07 T-090 nina status"26+$N status; echo "STATUS_RC=$?"27+28+echo "### G-07 T-096 nina info (expect nixos version, kernel, uptime)"29+$N info; echo "INFO_RC=$?"30+31+echo "### G-07 T-094 nina doctor"32+$N doctor; echo "DOCTOR_RC=$?"33+34+echo "### G-07 T-097 nina boot (expect boot entries, current marked)"35+$N boot; echo "BOOT_RC=$?"36+37+echo "### G-07 T-093 nina log (expect operation history)"38+$N log; echo "LOG_RC=$?"39+40+echo "### G-07 T-091 nina diff (expect gen N -> N+1 changes)"41+$N diff; echo "DIFF_RC=$?"42+43+echo "KILN_CS_END"

view file