test: run the cocoon and process engine scripts against shimmed tools - #754
Open
CMGS wants to merge 1 commit into
Open
test: run the cocoon and process engine scripts against shimmed tools#754CMGS wants to merge 1 commit into
CMGS wants to merge 1 commit into
Conversation
The embedded shell scripts had no execution coverage. Each test runs a script under /bin/sh with cocoon, oras, systemctl, mount, tar and journalctl shims on PATH that log their calls and fail on demand, then asserts the call sequence, the exit code and what is left on disk: both record copies and their durable-first order, the guest address retry count, the snapshot replace on suspend, the thaw after a failed capture, the overlay mount and unmount pairing, the pull that leaves no digest behind, and the journal follow that ends with the unit or the guest.
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.
Test debt from the 2026-09 audit: the shell scripts embedded in the cocoon and process engines had no execution coverage. Each test runs one script under
/bin/shwith shims forcocoon,oras,systemctl,mountpoint,mount,umount,tar,sleep,sedandjournalctlonPATH; the shims log their calls and fail on demand, and the test asserts the call sequence, the exit code and what is left on disk.cocoon: record (both copies, durable first, nothing published when the durable write fails), start (inspect around the boot,
NotExistsCodefor a lost vm), refresh (console socket and PID rewritten in place), address (retries until the guest agent answers, 90 attempts then gives up), remove (forced and graceful, an already-dropped vm tolerated, a refused remove keeps the records), suspend (snapshot replaced), resume (restore by copy, snapshot kept on failure), stop (flags passed through), inspect, wait (refuses a vm cocoon does not have), import (parts reassembled once, nothing imported after a failed pull), the oras probe, and follow (journal ends with the guest).process: meta (mount state and record), start (stale unit stopped, overlay mounted or kept, raw workload without one, a unit that will not stop fails the start), stop (kill only when forced, tolerated on a dropped unit), remove (overlay unmounted, dir and record gone), inspect, wait (polls until the unit leaves running), list, pull (bundle unpacked, digest recorded, nothing recorded when the registry refuses), create (bundle pulled or seeded from the cache, raw workload gets no overlay, a failed pull drops the dir), exist (freeze, capture, thaw even when the capture fails, own mount left alone), follow and chdir.
Tests only, no production change. Gates: build, vet, full tests, lint, fmt-check, asl on linux and darwin green; the scripts target Linux nodes, so the Linux CI run is the evidence that counts.