vm-testing

Guides testing of a Rust VMM across unit, boot, endurance, and fresh-install acceptance tiers.

Updated Aug 18, 2026
One-click install
npx skills add https://github.com/doctorspider42/entangled-destop --skill vm-testing-doctorspider42
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vm-testing
Source: https://github.com/doctorspider42/entangled-destop/tree/main/.agents/skills/vm-testing
Command: npx skills add https://github.com/doctorspider42/entangled-destop --skill vm-testing-doctorspider42

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Testing a virtual machine monitor is hard: unit tests cannot see device-level bugs, boot tests hang instead of failing, serial transcripts break naive string matching, and tests run inside a developer checkout cannot see bugs that only affect shipped releases. This Skill encodes the Entangled Desktop testing strategy so every test tier is written and run correctly. ## Core Features & Use Cases - Seven test tiers: pure unit tests, malicious-guest adversarial tests, self-skipping KVM tests, boot-to-marker integration tests, 100-boot and 8-hour soak endurance runs, screenshot-comparison graphical tests, and fresh-install acceptance of published releases. - Hard-won correctness rules: read serial transcripts with from_utf8_lossy (never read_to_string), strip ANSI escapes before matching markers, and scrub environment variables and working directories so acceptance tests behave like a stranger's machine. - Guest test images and probes: bootstrap kernel plus initramfs with ready markers, poweroff/netprobe/padprobe command-line probes, and guidance on which kernel each probe requires. - Use Case: When adding a test for a virtio device or debugging a failing boot test in CI, load this Skill to follow the established harness patterns, self-skip conventions, and marker-matching rules instead of rediscovering them. ## Quick Start Load the vm-testing skill and help me write a boot integration test for a new virtio device following the project's test tiers.

Frequently Asked Questions about vm-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write a boot integration test for a VMM in Rust?

Boot a test kernel plus initramfs, capture serial output, and scan for a ready marker like GUEST_READY_MARKER with a deadline. Treat a kernel panic string as immediate failure and a missing marker as failure, never a hang.

Why does my serial transcript marker matching fail in VM tests?

Serial transcripts are not valid UTF-8 and contain ANSI color escapes. Read with fs::read plus String::from_utf8_lossy instead of read_to_string, and strip escape sequences before matching, since systemd colors strings like the distribution name.

How do I run KVM tests in CI or WSL?

KVM tests must self-skip with an eprintln note when /dev/kvm is absent or permission-denied so plain CI stays green. GitHub Linux runners expose /dev/kvm, and WSL2 exposes it if the dev user is in the kvm group.

How do I test a shipped installer rather than a build checkout?

Run the fresh-install acceptance scripts, which download the published release over plain HTTPS, install into a scratch directory, and scrub profile directories, tokens, and any Cargo.toml or artifacts above the working directory.

What are the limitations of CI for hypervisor testing?

GitHub runners expose no WHP on Windows and no usable /dev/kvm for the fresh-install job, so nothing boots there. Booting guests and WSL engine validation must run on a developer machine with a real hypervisor.