From 915e6d5b1189d972aec4e95abf95752feccabc8d Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Thu, 29 Oct 2026 22:52:46 -0700 Subject: [PATCH 1/2] chore(quest): claim quest/m0/ci/vm-kvm.md Quest-Claim: 7bb212f70b678462 From 59b34614a15612d8bf76a06aba55191fbf4fc5fe Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Thu, 29 Oct 2026 23:02:36 -0700 Subject: [PATCH 2/2] fix(ci): refuse check flake's VM tests without KVM On x86_64 Linux, check flake now fails at once when /dev/kvm is missing, instead of booting the NixOS VM tests under QEMU emulation until they time out. It refuses rather than skips, so a local gate never reads as passing without them. Co-Authored-By: Claude Opus 5.5 --- quest/m0/ci/README.md | 1 - quest/m0/ci/vm-kvm.md | 22 ---------------------- sh/dispatch.sh | 7 +++++++ 3 files changed, 7 insertions(+), 23 deletions(-) delete mode 100644 quest/m0/ci/vm-kvm.md diff --git a/quest/m0/ci/README.md b/quest/m0/ci/README.md index 21a89840eba..08978ad3002 100644 --- a/quest/m0/ci/README.md +++ b/quest/m0/ci/README.md @@ -139,4 +139,3 @@ The historical samples locate candidates; they are not controlled benchmarks. - [Stats oversize](/quest/m0/ci/stats-oversize.md) - moq-stats refuses an oversized plain snapshot before parsing it back - [Gate send-depth](/quest/m0/ci/send-depth-gate.md) - the merge gate runs send-depth on a pinned nightly when moq-net changes, after #6890 fixes main - [Cargo aliases in nested checkouts](/quest/m0/ci/cargo-alias-strings.md) - `cargo build-ffi` and `cargo moq` work from a worktree nested inside another checkout -- [VM checks refuse a host without KVM](/quest/m0/ci/vm-kvm.md) - `check flake` fails fast with a clear message instead of an emulated-boot timeout diff --git a/quest/m0/ci/vm-kvm.md b/quest/m0/ci/vm-kvm.md deleted file mode 100644 index 1849bc677e9..00000000000 --- a/quest/m0/ci/vm-kvm.md +++ /dev/null @@ -1,22 +0,0 @@ -# [XS] VM checks refuse a host without KVM - -## Goal - -`just ci`'s `check flake` fails at once with a message naming the missing -`/dev/kvm` when it would run the NixOS VM tests (such as -`vm-test-run-github-runner-vm`) on a host without KVM, instead of booting the -VMs under software emulation until they time out with "Shell did not start -in time". - -## Plan - -Decided by the maintainer on 2026-10-29, from the follow-ups of -[moq-dev/moq#7175](https://github.com/moq-dev/moq/pull/7175), whose local gate -spent about 19 minutes before failing this way on a host without KVM. - -- Refuse, don't skip: a skipped check would let a local gate read as passing. - The message says the check needs KVM and that CI runs it. -- The other follow-up from #7175, a nested Codex shell's `BASH_ENV` snapshot - inflating `PATH` past mbx's exec limit, did not reproduce with codex-cli - 0.162.1 (`BASH_ENV` unset, `PATH` stable across nested shells), so it is - neither planned nor reported. diff --git a/sh/dispatch.sh b/sh/dispatch.sh index 37b1dff5443..817ed7291c9 100755 --- a/sh/dispatch.sh +++ b/sh/dispatch.sh @@ -314,6 +314,13 @@ step() { return 77 fi fi + # Without KVM, QEMU falls back to emulation and the VM tests time + # out long after. Refuse rather than skip, so a local gate never + # reads as passing without them. + if [[ "$OSTYPE" == linux* && "$HOSTTYPE" == x86_64 && ! -e /dev/kvm ]]; then + echo "$action: flake's NixOS VM tests need KVM, but /dev/kvm is missing; run them on a KVM host, as CI does" >&2 + return 1 + fi # 77 marks the probe's skip, so the check's own 77 is a failure. # Full build logs name a failing VM subtest; Nix otherwise keeps # only the last 25 lines, which are QEMU's cleanup.