一键导入
qemu-qtest
Use as a QEMU flow primitive for QEMU qtest design, registration, execution, and immediate qtest evidence capture.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use as a QEMU flow primitive for QEMU qtest design, registration, execution, and immediate qtest evidence capture.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use as the first step for any non-trivial QEMU task. Produces a small implementation or debugging plan under a .oh-my-qemu task workspace with acceptance criteria, scope boundaries, artifact policy, and verification gates.
Use for QEMU board, SoC, machine, memory map, boot path, FDT/ACPI, and IRQ topology modeling. Extends qemu-plan and qemu-rlcr-loop; board work must add or extend qemu-qtest coverage for verification.
Use for booting Linux in QEMU through either direct kernel loading or firmware and bootloader stages, selecting the path from task inputs while preserving provenance, boot logs, debug handoff, and verification evidence.
Use for QEMU peripheral, accelerator, MMIO, qdev, or SysBusDevice modeling. Extends qemu-plan and qemu-rlcr-loop; register-bank modeling must use QEMU's registerinfo framework and qtest verification.
Use for adapting a QEMU TCG host backend, including optional op support, constraints, register allocation, host code emission, qemu_ld/st, atomics, and vector ops. Extends qemu-plan and qemu-rlcr-loop.
Use for adding, reviewing, or debugging a guest ISA instruction in a QEMU TCG frontend. Extends qemu-plan and qemu-rlcr-loop; this skill only defines frontend decode/translation decisions.
| name | qemu-qtest |
| description | Use as a QEMU flow primitive for QEMU qtest design, registration, execution, and immediate qtest evidence capture. |
Use this operational/domain skill for QEMU device and board tests using the qtest framework.
This primitive owns only qtest design, registration, execution commands, and immediate qtest evidence. It consumes a behavior claim, source tree, build directory, and artifact root supplied by the caller and does not choose build, debug, verification, or iterative-fix workflow steps.
Do not produce source code intended for QEMU upstream submission. Do not add DCO or review trailers.
Use qtest for:
Prefer qtest over boot smoke for device contracts.
Run from a configured build directory. Default to build/.
List tests:
build/pyvenv/bin/meson test -C build --list
Run one test:
build/pyvenv/bin/meson test -C build qtest-riscv64/<test-name>
Make frontends from inside build/:
make check-qtest
make check-qtest-riscv64
V=1 make check-qtest-riscv64
Use the narrow Meson test name when possible.
Inspect:
tests/qtest/meson.build for architecture buckets;tests/qtest/<name>.c for source;tests/qtest/libqtest.h for API;build/meson-logs/testlog.txt for failures.Register architecture-specific tests under the matching qtests_<arch> list. Use qtests_generic only when the test is truly architecture-independent.
qtest_init(), qtest_initf(), qtest_quit();qtest_system_reset();qtest_qmp(), qtest_qmp_assert_success(), qtest_qmp_eventwait(), qtest_hmp();qtest_readb/readw/readl/readq(), qtest_writeb/writew/writel/writeq();qtest_memread(), qtest_memwrite(), qtest_memset();qtest_inb/inw/inl(), qtest_outb/outw/outl();qtest_irq_intercept_in(), qtest_irq_intercept_out(), qtest_set_irq_in();qtest_clock_step_next(), qtest_clock_step(), qtest_clock_set().Use libqos/qgraph when nearby subsystem tests already do.
Qtest environment variables include:
QTEST_QEMU_BINARYQTEST_QEMU_ARGSQTEST_QEMU_IMGQTEST_QEMU_STORAGE_DAEMON_BINARYQTEST_STOPQTEST_LOGUse verbose test output to recover exact commands. Use QTEST_STOP=1 when attaching a debugger to spawned QEMU is needed.
/tmp.Include:
docs/devel/code-provenance.rst.qemu-testing skill.docs/devel/testing/main.rst.docs/devel/testing/qtest.rst.tests/qtest/libqtest.h.