utils/vmbox/tests
Krzysztof kuhy Rudnicki 36234e980a vmbox: add the end-to-end acceptance demos
shutdown_verdict_demo.sh exercises every branch of the verdict table against a
real guest -- clean poweroff, reboot-instead-of-poweroff, kernel panic, and a
command that leaves the machine running. The failure branches matter as much
as the success one: a verifier that has only ever returned "pass" is untested.

destructive_demo.sh is the acceptance test for the tool as a whole: destroy
/etc and /usr in the guest, assert the guest really is broken, reset with one
command, assert it is pristine again, then assert the HOST is untouched
(/etc/hosts attributes unchanged, base image hash unchanged, /etc and /usr
still present).

Measured on the first real run, which confirms the design's central claim:
QMP reported SHUTDOWN {"guest": true, "reason": "guest-shutdown"} and the
serial log reached "reboot: Power down", so the verdict was "clean poweroff"
with exit 0 -- while ssh saw only "Connection closed by remote host", which
would have been indistinguishable from a crash or a dropped link.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VdyMBGCrGVGDWtJ9xe48f3
2026-08-22 21:08:53 +02:00
..
destructive_demo.sh vmbox: add the end-to-end acceptance demos 2026-08-22 21:08:53 +02:00
shutdown_verdict_demo.sh vmbox: add the end-to-end acceptance demos 2026-08-22 21:08:53 +02:00
test_vmbox.bats vmbox: disposable Arch VM sandbox for destructive system tests 2026-08-22 20:47:56 +02:00