feat(test): automated headless VM e2e harness + coverage matrix - #14
Merged
Conversation
The last-mile validation docs/vm-validation.md called for: a pure-stdlib Python orchestrator (test/e2e/vm/e2e.py) that drives QEMU headless over a serial socket to run the full flow unattended — boot the live ISO, `install --yes`, inject a harness-only Phase-B autorun (NOPASSWD sudoers + serial-getty autologin + bootstrap/validate scripts, none of which touches real configs), reboot, run `bootstrap`, and assert the installed system. Runs are isolated per descriptor (own rundir/disks/serial socket/NVRAM) and can run concurrently via `--jobs` with a per-descriptor flock guarding against collisions. `task vm-e2e` / `vm-e2e-list`. Coverage (18 descriptors): disk layouts — lvm (single/multi/multi-volume), btrfs (+compress/snapper), plain (every swap type), systemd-boot, LUKS (lvm_on_luks + luks, asserted on the ISO since encrypted Phase B is unimplemented); and stage features validated by lib/features.sh — reflector, custom kernel, plymouth, hooks, setup, services, dotfiles (injected local chezmoi repo), flatpak, KDE desktop. A full matrix run (archinstall 4.3) confirmed the bootloader/swap/encryption/ snapper shapes and surfaced 3 real bugs, written up in docs/bugs/: btrfs installs to the top-level subvolume (configured @ unused); multi-volume LVM renders the PV partition with an empty fs_type (archinstall aborts); and the Phase-B `bootctl update` refresh fails on systemd-boot (reached via the always-on plymouth stage). A fourth — the flatpak stage hangs on a polkit prompt — is documented too. docs/vm-validation.md is updated to a results/closeout doc; CONTRIBUTING.md documents add → test (manual vm.sh + automated vm-e2e) → commit → PR; the vm/vm-fresh/vm-disk tasks are reframed as the interactive companion to vm-e2e. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds the automated, headless VM end-to-end harness that
docs/vm-validation.mdcalled for— the last-mile proof that a real archinstall does the right thing end-to-end on a booted
system, not just that our render parses.
test/e2e/vm/e2e.py(pure stdlib — no pip) drives QEMU headless over a serial socket:boot the live ISO →
archwright install --yes→ inject a harness-only Phase-B autorun(NOPASSWD sudoers +
serial-gettyautologin + bootstrap/validate scripts, none of which leaksinto real configs) → reboot →
archwright bootstrap→ assert the installed system. Runs arefully isolated per descriptor and run concurrently via
--jobs(per-descriptorflockguardsagainst collisions).
Coverage (18 descriptors)
(every swap type), systemd-boot, LUKS (
lvm_on_luks+luks).lib/features.sh): reflector, custom kernel,plymouth, hooks, setup, services, dotfiles (injected local chezmoi repo), flatpak, KDE.
Results from a full matrix run (archinstall 4.3)
14 green. The bootloader / swap / encryption / snapper reverse-engineered shapes are
confirmed. Three shapes surfaced real bugs, written up in
docs/bugs/(not fixed here):btrfs-subvolume-not-used-as-root.md@unusedlvm-multivolume-pv-fstype-empty.mdfs_type→ archinstall abortsplymouth-bootctl-update-fails-systemd-boot.mdbootctl updatefails on systemd-boot (via the always-on plymouth stage)flatpak-system-remote-add-polkit-hang.mdAlso
docs/vm-validation.mdreworked into a results/closeout doc with links to the bugs above.CONTRIBUTING.md: add → test (manualvm.sh+ automatedvm-e2e) → commit → PR.vm/vm-fresh/vm-diskreframed as the interactive companion tovm-e2e;stale
e2e-disks.ymlcomment fixed.Testing
go build,go vet,go test ./...,gofmt -l .all clean. The harness itself is exercisedlocally (needs
/dev/kvm); seetest/e2e/vm/README.md#requirementsfor host deps. Encryptiondescriptors assert the on-disk LUKS shape on the ISO (encrypted Phase B is unimplemented); the
harness validates boot → bootstrap → assertions, not graphical desktop rendering (use
task vm-diskfor that).🤖 Generated with Claude Code