qemu-qtest
Skill60 starsChanged 13 days agoMITView on GitHub
Use for QEMU qtest design, registration, execution, debugging, and immediate evidence capture for device, board, QMP, timer, IRQ, DMA, and memory behavior.
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 37
Use qtest for MMIO/PIO register contracts, reset behavior, IRQ assertion/deassertion, virtual-clock and timer behavior, QMP-visible state …
- Distinctive: line 71
Run the narrow test name first.
- Very specific: line 74
After editing, run the skill's scripts/check-registration.sh --help (or with --meson, --source, --arch) to check registration, bucket, and …
- Very specific: line 87
When the machine or device does not build yet, syntax-check only the new test: take a sibling qtest's compile command from …
- Distinctive: line 96
Read the model source and know its register framework and unimplemented windows before writing or accepting a device qtest.
- Distinctive: line 105
Add tests when the user asks or the acceptance criteria require them.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
QEMU qtest
Audit workflow
For a non-trivial task that writes to the workspace, use only the needed entries under
.oh-my-qemu/<task-slug>/: audit.md (baseline, plan, decisions, evidence, verification, and
gaps), commands.md (redacted commands, working directories, and results), logs/ (decisive
build, test, and runtime output), scripts/ (probes, parsers, and harnesses), and output/
(generated deliverables, third-party dependencies, and non-QEMU binaries). Keep QEMU's own build
tree at source-root builds/build-<target>/, never an unqualified build/. In a Git worktree,
add .agents/, .oh-my-qemu/, and builds/ to the file from
git rev-parse --git-path info/exclude before writing artifacts or configuring QEMU; preserve
existing entries and avoid duplicates. Never stage or commit these paths; stage source only when
the user explicitly requests that separate action. At handoff, reconcile git status --short
with the baseline and report the task directory, build directory, source changes, pre-existing
changes, and unresolved gaps.
QEMU upstream boundary
QEMU's official GitLab and mailing lists are upstream channels. A patch becomes an upstream
contribution when it is sent to the maintainers selected through MAINTAINERS. Do not prepare or
send agent-generated code, documentation, commit messages, or patches for upstream submission; see
the checked-out tree's docs/devel/code-provenance.rst. Research, debugging, analysis, local
experiments, verification, and workflow guidance remain allowed. Local branches, commits, patch
files, pushes, and pull requests are not by themselves upstream contributions; perform those Git
actions only when requested.
What qtest should prove
Use qtest for MMIO/PIO register contracts, reset behavior, IRQ assertion/deassertion, virtual-clock and timer behavior, QMP-visible state and hotplug, board instantiation and memory-map probes, and simple DMA or guest-memory effects. Prefer qtest over boot smoke for a device contract.
A qtest proves only what its assertions read. A test that reads the wrong address can hide a model bug. Copyable recipes are in qtest patterns.
Run from the QEMU source root
Address the build directory explicitly; never rely on an unqualified build/:
builds/build-<target>/pyvenv/bin/meson test \
-C builds/build-<target> --list
builds/build-<target>/pyvenv/bin/meson test \
-C builds/build-<target> qtest-<arch>/<test>
builds/build-<target>/pyvenv/bin/meson test \
-C builds/build-<target> -v qtest-<arch>/<test>Inside the build directory the equivalent is pyvenv/bin/meson test
qtest-<arch>/<test>. The Makefile wrappers take the same build directory:
make -C builds/build-<target> check-qtest-<arch>. Meson registers a test as
qtest-<arch>/<name>, where <arch> is the target without -softmmu
(tests/qtest/meson.build).
Find, register, and run
tests/qtest/meson.buildowns registration; put architecture-specific tests inqtests_<arch>and only truly generic ones inqtests_generic.tests/qtest/<name>.cis the source andtests/qtest/libqtest.hthe API.builds/build-<target>/meson-logs/testlog.txthas failure detail.- Run the narrow test name first; widen only when needed.
- Plan the assertions and evidence with the qtest plan template before writing code.
- After editing, run the skill's
scripts/check-registration.sh --help(or with--meson,--source,--arch) to check registration, bucket, and lifecycle.
Verify APIs before authoring
libqtest names and helpers change between QEMU versions. Locate every call you
use in the checked-out tests/qtest/libqtest.h and nearby tests; do not write
an API from memory. When a helper is absent, use a QMP command that exists in
this tree or the qtest protocol through a checked-out helper.
Author before the machine builds
When the machine or device does not build yet, syntax-check only the new test:
take a sibling qtest's compile command from
builds/build-<target>/compile_commands.json, replace the source file with the
new one, add -fsyntax-only, run it from the build directory, and record the
command. Register the test in tests/qtest/meson.build in the same change and
build it for real before claiming a PASS.
Framework preflight
Read the model source and know its register framework and unimplemented
windows before writing or accepting a device qtest. Keep tests behavioral:
exercise the guest-visible interface, not the selected framework. Report a
contradiction between model and register contract as FAIL or INCONCLUSIVE with
citations, not as a test-only problem; record the verdict and what evidence
would change it in audit.md.
Tests are requested scope
Add tests when the user asks or the acceptance criteria require them; do not expand a fix-only request into a test mandate. When the user drops a requested test, remove it and its registration cleanly, and record the change.
Report
Record PASS, FAIL, or INCONCLUSIVE with the build directory, exact command,
test name, decisive excerpt, log path, and what the run does and does not
prove. Keep logs under .oh-my-qemu/<task-slug>/logs/.
Upstream references
- QEMU code provenance and AI policy:
docs/devel/code-provenance.rst. - Testing overview:
docs/devel/testing/main.rst. - QTest docs:
docs/devel/testing/qtest.rst. - Build and test invocation:
docs/devel/build-system.rst. - API:
tests/qtest/libqtest.h. - Registration:
tests/qtest/meson.build.
Paths can differ between QEMU versions; locate them in the checked-out tree.
In this repository19 other files it gives its agents.
- AGENTS.mdAGENTS.md
- qemu-agent-feedbackSkill
- qemu-board-modelingSkill
- qemu-boot-runSkill
- qemu-buildSkill
- qemu-debugSkill
- qemu-imageSkill
- qemu-kernel-buildSkill
- qemu-linux-bootSkill
- qemu-modelerSkill
- qemu-model-reviewSkill
- qemu-model-verificationSkill
- qemu-peripheral-modelingSkill
- qemu-register-extractionSkill
- qemu-rst-documentationSkill
- qemu-tcg-backendSkill
- qemu-tcg-frontendSkill
- qemu-uboot-buildSkill
- qemu-workflowSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

