Repository navigation
fix(ci): refuse check flake's VM tests without KVM #7281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -337,6 +337,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 | ||
|
Comment on lines
+343
to
+346
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| # 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. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On x86_64 Linux without
/dev/kvm, this host-device check also breakssh/dispatch-query.test.py, whosestub_ci()mocks Nix and the other tools but not device availability. I reproduced 20 failures across its 28 tests; removing only this new block makes all 28 pass. Because.github/justfileruns this suite ingh test, even excluding the real flake lane does not let that tooling check pass on a non-KVM host. Update the test harness to control KVM availability independently of the host while preserving the refusal for actual VM checks.Useful? React with 👍 / 👎.