fix: HMP echo detection and CNI dirs in the VM record - #43
Merged
Conversation
A password beginning with a double quote makes QEMU answer 'set_password: string expected' and 'Try "help set_password"'; both lines contain set_password, so the substring test took them for echo and the launch reported a password that was never set. The echo is now the first line carrying the command prefix, and only that line.
vm rm has no --cni-conf-dir/--cni-bin-dir, so a CNI VM created against a non-default CNI installation kept its NIC forever ('nic release incomplete'). run and clone now persist both dirs and every provisioning verb reads them from the record; records without them keep the defaults.
…older records QEMU's readline echoes the typed command with redraw sequences, so a prefix test would have taken every successful echo for a rejection. The echo is the first line containing 'set_password ' and only that line. Records written before the CNI dirs were persisted resolve flag, then record, then default, so rm --cni-conf-dir/--cni-bin-dir can release their NICs.
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.
Two findings from the 2026-09-03 final verification lane on the testbed.
hmpRepliedskipped every line containingset_password, so a password beginning with a double quote (QEMU answersset_password: string expectedandTry "help set_password" ...) was reported as set while the guest had none. Only the echoed command line is skipped now; regression case added to the HMP transcript table.vm rmhad no--cni-conf-dir/--cni-bin-dir, so a CNI VM created against a non-default CNI installation could never release its NIC.runandclonepersist both dirs in the record and every provisioning verb reads them from there; older records keep the defaults. Documented indocs/networking.md.Gates:
make lint0 issues on GOOS=linux and darwin,make fmt-check,asl ./...on both GOOS,GOOS=linux go vet ./...,go test -race -count=1 ./....