vmsuite.sh: the ssh-ready snapshot becomes one base image, every block gets a new qcow2 overlay (no snapshot restore), each suite has its own VM directory and ssh port (2301-2305, boot loaders 2401-2403), the host's package cache is bound over pacman's, VM_MEM defaults to 4G for tests (run.sh VM_MEM, default 8G). vmtest.sh runs up to MAX_PARALLEL=3 jobs at once, slowest first. scripts/vmtest-remote.sh runs vmtest.sh on another machine (the PC) over ssh and prints the summary. CLAUDE.md and the branch cleanup skill now live in the repo. Not proven as a whole: three VMs at once and the base image work, but a complete parallel run to the end has not finished yet (P1/P2 in TODO.md); the remote runner and WSL2 are untried (R1-R2).
6.8 KiB
TODO
GitHub Actions: run the boot loader test in CI
Goal: every push/PR (and on demand) runs the whole automated test (scripts/vmtest.sh, see the next
section: boot loaders plus every suite) on runners, one job per suite or loader, and fails on any FAIL line.
Public repos, so the free Linux runners with KVM apply. Work on feature/ci-bootloader-test,
PR into the release branch. Tick items off as they're done.
- 1.
run.sh: headless mode (VM_HEADLESS=1->-display none, plain virtio-vga); still to do: makevmtest.shandvmbootloadertest.shheadless by default (--windowopts out, a log Konsole opens on a desktop, CI opens none) and copy the repo's run.sh into$VM_DIRbefore starting - 2.
vminstall.sh: read the ISO's kernel/initramfs withoutudisksctl(bsdtar/7z when there is no session) - 3.
vminstall.sh/vmbootloadertest.sh: no/dev/ttyprompts and nopgrepon the whole host in CI (CI=1) - 4. Where the ISO comes from: newest artifact of
steammachine-cachyos-live-iso'sbuild.yml(gh run download -R theupriser/steammachine-cachyos-live-iso), or aworkflow_dispatchinput (run id / URL) - 5.
.github/workflows/bootloader-test.yml: matrix overlimine, systemd-boot, grub; steps: install qemu + ovmf, enable /dev/kvm, fetch the ISO, run the script, upload~/vms/bl-<loader>.test.logas an artifact - 6. Runner limits: disk (sparse 60 GB qcow2, free space check), RAM (8 GB VM on a 16 GB runner), timeout (60 min)
- 7. Cache the pacman packages between runs (
actions/cacheon~/vms/pkg-cache,VM_CACHE) - 8. Trigger it once on the branch, fix what the runner shows; note the run time in the skill
- 8b. Second job,
--fremonthardware tests from TESTPLAN.md section H (LED driver, CEC with vivid, BIOS dry-run, boot into desktop/gaming and reboot, power-off module): guest-side, so they run on a runner too; needs a way to check without screenshots (gaming mode doesn't render) - 9.
vm-installskill +vmtest.shheader: mention the workflow, and that the advertised-loader check fails CI when a loader has no test - 10. TESTPLAN.md: section B for the boot loader test (B1-B8), pointing at
scripts/vmtest.sh
Full automated test: everything in TESTPLAN.md that needs no person
One command, scripts/vmtest.sh [suite...] (suites: boot, cli, menu, hw, installer; default all),
each check prints PASS/FAIL, the summary counts them, exit status = failures. Each block starts from a
fresh ssh-ready (scripts/vmreset.sh --fremont), as TESTPLAN.md says. GitHub runs the same command.
Guest-side checks live in share/vmtest/<suite>/, one file per TESTPLAN block. Adding a row to
TESTPLAN.md means adding its check here (say which row each check covers in a comment: # F4).
Automatable (encode as checks): R1.1-R1.6, R1.7 (vmcec.sh already prints PASS/FAIL), R1.8 (toggle matrix),
R1.9, R1.10, R2.1, G1-G3, F1-F7, H1, H3, H4 (session file), H5, and the boot loader matrix (done).
Not automatable without a person (stay manual, listed in the summary as SKIP; no screenshot testing): U1-U9,
R2.2 (first desktop login look), H-Real (real Steam Machine).
- S1. Framework (vmtest.sh runs boot + every suite, --screen, summary in ~/vms/last-test.txt):
scripts/vmtest.shtakes suites, resets the VM per block, tallies PASS/FAIL/SKIP, prints the skipped manual rows; move the loader matrix under suiteboot - S2. Suite
cli(55 checks pass): G1-G3, F1-F7 (exit codes,features.state, boot-desktop unit) - S3. Suite
menu(36 checks pass): R1.1-R1.6, R1.10 with scripted menu input (vmrun.sh) andvmstate.shasserts - S4. Suite
hw(70 checks pass incl. H3 BIOS dry-run): H1, H3 (WIZARD_BIOS_DRY_RUN=1), H4, H5, R1.7 (vmcec.sh --no-sleep) - S5. Suite
installer(4 pass): R2.1 (vminstallsim.sh) - S6. R1.8 toggle matrix as suite
toggles(42 pass, 1 expected skip); R1.9 reboot checks still to add - S7. TESTPLAN.md: mark which rows are automated (a column or a tag), keep the results log automatic: the script appends a line to it (date, branch, suites, counts)
- S8. Update the
steam-machine-testingandcachyos-vm-testingskills: "runscripts/vmtest.sh" first
Speed: the full run takes about an hour (target 20-25 min)
Where the time goes: boot loader VMs ~3 min each, every suite block restores a snapshot and reboots (~1 min), and every block that applies Steamify downloads Steam and the rest again from the mirrors.
- [~] P1 (implemented, one clean full run still to prove). Package cache for the suite VM:
VM_CACHEshared as 9p and bound over/var/cache/pacman/pkginvmreset.sh/the prelude (as vminstall-live.sh does); downloads only once - [~] P2 (implemented: base image + overlays, own port per suite, MAX_PARALLEL=3, VM_MEM=4G; a whole parallel run has not finished yet). Parallel: each suite (and each boot loader) on its own copy of the VM (
cp --reflinkof the disk and vars), ownVM_PORTandVM_DIR;vmtest.shstarts them together and waits; watch host CPU (16 cores, 6 vCPUs each) - P3. Fewer resets: merge blocks that only read state (cli 10 + the menu R1.1)
Run the tests on the PC (9800X3D, 64 GB) from a laptop
- R1.
scripts/vmtest-remote.sh <ssh-host>written; try it once: the PC needs the three repos, qemu + OVMF + screen, KVM (on Windows: WSL2 with nested virtualization), the VMs in~/vms(vmtest.sh --installbuilds the boot loader VMs,vminstall.sh --iso <CachyOS ISO>withVM_STEAMIFY=skipthe plain one), and the Steamify ISO - R1b. The PC is WSL2 (Windows). To check there:
/dev/kvmexists (Windows 11, virtualization on in the BIOS, nested virtualization on);%UserProfile%\.wslconfigmemory=is raised (WSL2 defaults to half the RAM = 32 GB; 3-4 VMs at 4-8 GB want ~48 GB) andprocessors=16; keep~/vmsand the repos on WSL's own ext4, not under/mnt/c;sudo apt install qemu-system-x86 ovmf screen; no desktop there, so runs are headless with no Konsole (view_startreturns early; watch withscreen -r vmtestortail -f ~/vms/test.log) - R1c.
vminstall.shreads the ISO's kernel withudisksctl, which WSL doesn't have: usebsdtar/7zwhen there is no udisks (same as CI step 2), or copy the VM directories (~/vms/steamify-vm,bl-*, ~35 GB) from the laptop with rsync - R2. With 64 GB and 8c/16t: try
MAX_PARALLEL=4and 8 GB VMs (VM_MEM=8G)
Boot loader test (local)
scripts/vmtest.sh [--install] [loader...]runs all advertised loaders,vmbootloadertest.shone- guest checks in
share/bootloader-test/(state, modules, legacy param, kernel update, boot check) - first full run of all three through
vmtest.sh: Limine 41 / systemd-boot 40 / GRUB 40, 0 failed - test the
VM_CACHEspeed-up with a second install