Restore the libvirt/virsh ISO testing script that was deleted in commit
c1d8c5d ("will fold into run.sh" but never was). run.sh still references
test-iso.sh via the test:iso command, so it must exist.
The original script had several issues preventing it from running on
this host. This commit restores it from git history (commit 241510c)
with the following fixes:
- Disk path: Changed from /var/lib/libvirt/images/ (root-owned) to
./tmp/ (writable by user), avoiding permission denied errors
- CPU model: Changed from deprecated "host" to "host-model" per
virt-install warning
- Graphics: Simplified from Spice with channel to plain VNC, fixing
"virtio-serial-bus: A port already exists" error
- Networking: Removed --network flag (no libvirt default network
available on this host; not needed for ISO boot testing)
- Sudo: Removed unnecessary sudo from qemu-img and rm commands
(user is in libvirt group and disk is in local tmp/)
- Startup: Removed redundant virsh start after virt-install (which
already starts the domain), fixing "Domain is already active" error
Commands:
./run.sh test:iso create Create and boot test VM from ISO
./run.sh test:iso console Connect to VM serial console
./run.sh test:iso status Show VM status
./run.sh test:iso destroy Stop and remove VM
Tested: VM boots successfully from the 450M ISO artifact.
💘 Generated with Crush
Assisted-by: GLM-4.7 via Crush <crush@charm.land>
- Replace libvirt group check with actual virsh access test
- Add QEMU direct execution fallback when virt-install fails
- Handle both virsh and QEMU pidfile for VM status
- Update STATUS.md: ISO verified, VM boot test passed
- Runtime coverage now ~50% (boot verified)
💘 Generated with Crush
Assisted-by: GLM-4.7 via Crush <crush@charm.land>
Create comprehensive system testing infrastructure for
runtime verification of the KNEL-Football ISO.
test-iso.sh (VM test framework):
- VM creation via virt-install with UEFI support
- Prerequisite checking (libvirt group, virsh, ISO)
- Boot test automation with timeout handling
- Secure Boot and FDE test commands
- Console access via virsh console
- Color-coded logging for clarity
tests/system/boot_test.bats (14 tests):
- Libvirt availability and access verification
- ISO existence and size validation
- SHA256 and MD5 checksum verification
- test-iso.sh framework validation
tests/system/secureboot_test.bats (10 tests):
- Secure Boot package verification in package list
- UEFI/GPT partitioning configuration tests
- LUKS2 encryption configuration validation
tests/system/fde_test.bats (23 tests):
- Encryption setup script existence tests
- LUKS2 configuration validation
- AES-256-XTS cipher verification
- 512-bit key length verification
- Initramfs and crypttab configuration
- Helper scripts creation validation
- Password policy enforcement tests
- Runtime FDE test placeholders (skip if no VM)
Test execution:
- All tests pass with appropriate skips when
prerequisites (libvirt group, ISO) are not met
- Zero failures in static analysis portion
Total: 47 new system tests
💘 Generated with Crush
Assisted-by: GLM-5 via Crush <crush@charm.land>
Create test-iso.sh script for automated ISO testing using libvirt/virsh VMs. Supports create, start, stop, console, destroy, status, and list commands. Runs on host system (not inside Docker). Includes prerequisite checks, VM configuration (20G disk, 4GB RAM, 2 VCPUs), and cleanup functionality.
💘 Generated with Crush
Assisted-by: GLM-4.7 via Crush <crush@charm.land>
Moves current active scripts to scripts/ directory:
- build-iso.sh: Creates Debian ISO with preseed
- test-iso.sh: Tests ISO in QEMU VM
Keeps root directory clean and organized.
💘 Generated with Crush
Assisted-by: Gemini 2.5 Flash via Crush <crush@charm.land>
Updates test-iso.sh:
- Reduces VM RAM from 4GB to 2GB (more reasonable for testing)
- Uses screen sessions for long-running QEMU process
- Provides clear instructions for screen session access
- Saves QEMU PID for process management
- Updates VM configuration display
Screen session: football-iso-test
Access: screen -r football-iso-test
💘 Generated with Crush
Assisted-by: Gemini 2.5 Flash via Crush <crush@charm.land>
Adds test-iso.sh script for testing ISO installation:
- Verifies ISO exists before testing
- Creates 16GB test disk in Docker
- Boots QEMU VM from ISO (16GB RAM, 2 CPUs)
- Monitors console for installation progress
- Saves console output to log file
- Provides commands for manual VM access
- All verification done in Docker
This enables automated testing of ISO-based installer.
💘 Generated with Crush
Assisted-by: Gemini 2.5 Flash via Crush <crush@charm.land>