test(e2e): fix the three firecracker tests that never ran - #206
Merged
Conversation
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.
Adding the Firecracker suite to the default set (#204) meant running it for the first time. Three of its nine tests failed. All three are test bugs — the runtime code is correct in each case — and each had been broken for weeks without anyone noticing, precisely because the suite never ran.
t2_portsdied before doing any work.ip link show | grep -oE 'ring-…'exits 1 on a host with noring-*tap, andset -ekilled the test there.setup.shandt4_restart.shalready guard the identical pipeline with|| true; this one was written without it.t3_api_instancesread instances throughdeployment list --output json. The endpoint only resolves.addresswhen asked with?instances=true— an opt-in added inc071bdd(29 June) to avoid a per-instance runtime inspect on every listing, and the CLI never passes it. The test predates that change by three weeks, so it had been asserting against a field that is null on every runtime. It now queries the API directly.Its second case asserted that a deployment without ports has no address. That encoded the pre-
55ba04bbehaviour; since 24 June this runtime allocates a tap for every microVM ("a microVM needs connectivity to be useful regardless of whether it publishes a port"), and ports only decide whether inbound forwarders are spawned. The assertion is inverted to match, with the reasoning recorded in place.t8_job_kindbooted its VM but never saw it complete. The CI rootfs ships withneeds_recoveryset, anddebugfswrites straight to the block device without consulting the journal — so the kernel replayed the journal at mount and overwrote the injected systemd unit. The symptom was far from the cause: systemd loggedWants dropin … unreadable, ignoring: Structure needs cleaning, the unit never ran, the guest never rebooted, and the job sat inrunninguntil the 180 s timeout. Fixed by replaying the journal withe2fsck -fybefore injecting.Verified
Ran on a host with firecracker,
/dev/kvmandCAP_NET_ADMINon the test binary. All 9 tests pass, where 6 did before. 779 unit tests still pass.This is the first real-runtime validation of the six micro-VM PRs merged this week — until now they were reviewed and unit-tested, but their boot paths were never exercised. Worth noting what the run confirmed along the way: the tap-collision guard reports the exact remedy, a failed boot classifies as retryable and climbs toward its restart bound rather than looping forever, no tap leaks across repeated failures, and instance addresses resolve to the expected
10.42.x.y/30.