Repository navigation
Run Mac image lifecycle scenarios in VM acceptance - #554
Merged
Merged
Conversation
mac-image takes the image-builder's output directory, holds IMAGE, PROVENANCE and INSPECTION to the payload, and boots each scenario through UEFI with the Limine entry's command line and an Apple root compatible: first boot, conversion and re-key, second boot and password change, with update, snapshot restore and factory reset skipped until an image ships their entrypoints. First boot also checks the Plymouth theme and /.snapshots.
…ew findings The chroot's rbind mounts propagated into every service's mount namespace, where the host's unmount never reached them, so the payload's loop device stayed busy until a reboot: the chroot now mounts in a private namespace. A cryptsetup error no longer reads as a refused passphrase, the recovery acknowledgement waits for gum's placeholder as it is drawn, a relative --payload unpacks, and first boot proves the deferred Limine step rebuilt the menu for this machine.
QEMU takes serial input only as fast as the guest drains the UART's 16-byte FIFO and drops the rest when the writer disconnects, which cut every typed line after 16 bytes.
… past it Its drive list is an unprivileged blkid, which finds no drive until root has run blkid this boot. The scenario records that, warms the cache with sudo as an owner could, and goes on to test the change itself. luks_slot returns its slot in a variable, so a cryptsetup error fails the run instead of reading as a refused passphrase.
After a drive password change, a refused login is a finding about the image, not a harness failure: the case says which password still logs in, and the cases after it still run.
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.
Ticket 28: VM acceptance accepts quattro-upstream images.
What changed
tools/acceptance/mac-image/runnow takes the image producer's output directory (--image DIR, from omacom/omarchy-mac-installerimage-builder/), not mx-mac's GRUB image releases.IMAGE(format 2),PROVENANCE, a passedINSPECTION,installer_data.json, the inputs record and every payload member to each other.IMAGE.sigis verified when present, andrun.txtrecords whether the image was signed.--scenario NAME,--list;fresh-installis the default):first-boot: plain install, owner setup, console login.conversion: LUKS2 in the initrd, then owner setup re-keys to the owner password and a recovery key.second-boot: Limine's command line prompts, refuses a wrong password, unlocks with the owner's.password-change:omarchy-drive-passwordat the console, then a boot with the new password.update,snapshot-restoreandfactory-resetskip while the image lacksupdate-verify(Post-update boot verification blocks update completion and the reboot #543), the snapshot check (ticket 36) orreset-prepare(ticket 34). Once an image ships one, its case fails until it is automated.conversionfirst.first-bootalso checks what the first M2 install got wrong: the Plymouth theme isomarchy(in the configuration and in the UKI's initramfs), and/.snapshotsis a btrfs subvolume. The default sink cannot be checked in a VM and is recorded as a skip.edk2-aarch64, pinned by digest), since the image builds its UKI only under UEFI.SHA256SUMSand the guest's first-boot and setup logs. Passwords and the recovery key are random per run and redacted.Testing
These were VM runs on the M1 Pro against the first converged image,
apple-test-073e489b5b85-20260925(payload sha2565e2a293a…21af, source073e489b5, which predates #528/#532/#540/#541):fresh-install(runt28-f, harnessfcc00c5): every lifecycle check passes.encrypt.stateis finished and Limine's command line carries no key file. Second boot refuses a wrong password and unlocks with the owner's.Expected failures on this older image: Plymouth theme
bgrt, and/.snapshotsis a plain directory. These are the M2 findings, which installer Consider adding error handling for the pacman command. If this fails, the function will continue and likely fail later with less clear error messages. #9 fixes in the builder.password-change(runt28-g, harnessadc2070):omarchy-drive-passwordlists no drive until root has runblkidin that boot, because its unprivilegedblkidreads only/run/blkid. The current version still does this.update,snapshot-restoreandfactory-resetskip with their reasons.Evidence is on the M1 Pro in
~/vm-evidence/mac-image-t28-{f,g}/, andSHA256SUMSverifies. The later commits only record the run identity earlier and change no check.Also seen: the image's
omarchy-mac-encrypt.servicesetsStandardOutput=journal+kmsg, which systemd rejects and ignores.tools/acceptance/test/mac-image-run-test.sh(new: scenario selection and refusals, no VM) passes. shellcheck was not available on the hosts used.Second review: two rounds. The first found a missed refusal on a cryptsetup error, the recovery-key acknowledgement never matching gum's placeholder, a relative
--payload, and README gaps. The second found the error path still swallowed inside a command substitution. All fixed.