From nobody Mon Jul 27 18:58:19 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1778519145; cv=none; d=zohomail.com; s=zohoarc; b=H9xMuh3IBf6tYoN2O1klC9d49VzluJKlzxlEphYw+OjwiJ8Sm+yR5zdfUW08p4cW6e8ahjMy435IQeLr/Y3/OuGuWPnLgVsnhBGCS++Z5cWr+sViwVn1v68MmWo8pv23e4epgMFVmfZbapTdCF2lhorRxKQ1Dt5BcjPRYE7vdl0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778519145; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=YKodQmYNNWaAk1teiRNN0+JW1aqt9sbMYp1HKpx3s6A=; b=Y2KTuV3I3Nb6v2NLVSIO5p0oAVSLi3HrlF9tsjYWGLA6JRygDrbl2a83IQ7Xl5+SBumPs9tlu9u/bqbqgNbB7Q74SXHFzKW3pX9umUooFpvqEJpWiBP9pw9byU/ilQBZXBOXAidWDml8sX5+hxWr7Z81nWj+NjrBOtHQQJb+jC0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1778519145156416.8496087471526; Mon, 11 May 2026 10:05:45 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wMU4E-00015M-Mk; Mon, 11 May 2026 13:05:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wMU46-0000tN-FP for qemu-devel@nongnu.org; Mon, 11 May 2026 13:05:10 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wMU43-0007nu-Ko for qemu-devel@nongnu.org; Mon, 11 May 2026 13:05:10 -0400 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-44c350a5b87so2807996f8f.3 for ; Mon, 11 May 2026 10:05:07 -0700 (PDT) Received: from draig.lan ([185.124.0.195]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-45492271510sm32228022f8f.37.2026.05.11.10.05.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 May 2026 10:05:04 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 022DC60814; Mon, 11 May 2026 18:05:01 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1778519105; x=1779123905; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=YKodQmYNNWaAk1teiRNN0+JW1aqt9sbMYp1HKpx3s6A=; b=yYpbILam2SGaDpsfl6H2vW2T6pFiCRiAsD7DBAsnv37BSCg0F528dBo/spe1tSpXRD KAG7rxa4nDRobUrzTDWb30W4Rur7jbuDRcBlxz2mucZngH/Tm/YuBvt3GJP952O5YYns sexJikXO+pJILi9IT12PYxPU/7J6BmtokOMqlh2XWui1Z/A2auguCdKWsUrAL3RwRGSU GoioR91M9YctZfJME2cpY6jTi6jJKe89yQDBG41jQOQ/6nrScwTH1Cdy4T5rc171pZ7h 5o7v6KCLj+l24KpGHgfnt4Dhub4SUdUA3uUfxs6rQMk4UToEzNL1rc4r7ZxFqWTW2qZE PW7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778519105; x=1779123905; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=YKodQmYNNWaAk1teiRNN0+JW1aqt9sbMYp1HKpx3s6A=; b=Wo9WXd7YTopQJfN1Lzj3YFc63DcveBpuKwyeSKtPb44A7bw8ELHClmCgrV603WwsXx mm44Th+qwk0htwl3gu1uRS/wEsXwDQFBpU831QdrJd4Z0Wr5FmJ1v8PGECWA554BrTSM U3ustTYt120j4LUzmdpJor9zw0tf3f/284UcdEP1ndfRRdW0HZabb9XSpH9nwgM53OEg bj65XkkJUaZDzrM4oFHSvdk+1HsY0KZp5Illy1pMj8dWP0Gf75r+NYTiawZ406IWu6WE A3JQxTRPKTbzm8Lkc2vGPun4hOdPplqLXXLDF+9fTsnOy6Ugufm6jYg23o76CjJH2CQu EdCg== X-Gm-Message-State: AOJu0YxmVvBKkSoY2G/Mg4GdPyAtbDdLT1+q2Pn8xzAV7emNCZ2KkU6r 5yEao3pGnsNhN61kSJQ7KPVCPmdrkRJhrps5kcOpYoNYLgVeY4hLD+vPB9JFoVzKq74= X-Gm-Gg: Acq92OHN+lvZxHJowUAOIIE33TIBt3afZ9o3eBacs3BvIk02M7xCCIuSQayGtCV9r9u O1er3nm9UdQ9XP26KSGgwLeL8BGFIlrkl4itgbpfcQFNU8oJt1Pg7JGynKoXg6zhAS5FPwyZB7K vZxsACzhWjedp8VRMWKgANpR/awSwtsDkuwEvOvpMQhyFPKEbX+MgFavTWdcugXNzSpUS8QTPxk meVCG4rXdC8Y7MOZGOzr68+vdOsm5Ipxv4SkazHs8laHaylVC/0YI4RrVOZ/7IAZlFt7tkZJ1vF gMs63RUgI3wclXinOOXJe/Jp8n5IHMwzIUV3tW2Df1u6EE4iGzogpf9ulLw8f1qM3Umb4nH0uR/ J/pZyYWqMk94J755zoaTH+UGp5vpNMsCn/8leDls1fsxt5yvRm5HhCiIlVXWtco7AriqwYRwR/p eSQ/p5WPHsMqSJ/ekyQo+J30c= X-Received: by 2002:a5d:5f53:0:b0:45a:cea8:e4b2 with SMTP id ffacd0b85a97d-45acea8e4f1mr248012f8f.29.1778519105432; Mon, 11 May 2026 10:05:05 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: John Snow , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Cleber Rosa Subject: [RFC PATCH v2 05/10] .agents/skills: add qemu-testing skill Date: Mon, 11 May 2026 18:04:54 +0100 Message-ID: <20260511170500.124211-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260511170500.124211-1-alex.bennee@linaro.org> References: <20260511170500.124211-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x430.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1778519147675158500 This provides basic instructions for running tests but doesn't try to exhaustively describe the whole setup. Signed-off-by: Alex Benn=C3=A9e --- v2 - add link to testing docs. --- .agents/skills/qemu-testing/SKILL.md | 56 ++++++++++++++++++++++++++++ AGENTS.md | 1 + 2 files changed, 57 insertions(+) create mode 100644 .agents/skills/qemu-testing/SKILL.md diff --git a/.agents/skills/qemu-testing/SKILL.md b/.agents/skills/qemu-tes= ting/SKILL.md new file mode 100644 index 00000000000..e5979dfc1c5 --- /dev/null +++ b/.agents/skills/qemu-testing/SKILL.md @@ -0,0 +1,56 @@ +--- +name: qemu-testing +description: Provides instructions on how to find, list, and run individua= l tests for QEMU (Unit, QTest, Functional, TCG). You MUST use this skill wh= enever the user asks about tests, wants to list available tests, or wants t= o run any test in a build directory, even for simple exploratory queries li= ke "what tests can I run". It includes details about spawning sub-agents. +license: GPL-2.0-or-later +--- + +# Instructions +To run QEMU tests, you can use several different suites depending on what = you are testing. **Note**: Ensure you have a recent build of QEMU before ru= nning tests. Use the `qemu-build` skill if you need to configure or run a b= uild. + +For exhaustive details on the testing infrastructure, architectures, and s= pecific test requirements, you MUST refer to the official documentation in: +- `docs/devel/testing/` (specifically `main.rst`) + +## General Test Suites +- **Unit Tests**: `make check-unit` +- **QTest (Device emulation)**: `make check-qtest` +- **Functional Tests (Python based)**: `make check-functional` +- **TCG Tests (CPU instruction tests)**: `make check-tcg` + +## Launching Tests +**Crucial**: You MUST NEVER run a test suites directly in the main agent c= ontext. You MUST ALWAYS launch them by spawning a sub-agent. Pass the speci= fic build or test commands, along with the required build directory, in the= `task` argument. Give the subagent explicit instructions on what to verify= and what to report back to you. +For example: `task: "Navigate to builds/debug and check what meson tests t= ouch replay and report back."` or `task: "Run make check-tcg in builds/arm = and summarize any failing tests."` + +### From the Build Directory +Most individual tests from within a build directory. Most (unit, qtest, bl= ock, functional) can be individually selected and run via meson. + +As QEMU often needs a newer meson than the build host you should use the b= uild `pyenv` to launch it: +- **Example**: `./pyvenv/bin/meson test --suite thorough --list` to see wh= at tests are in the thorough test suite + +## Running Individual Tests + +### Meson Test Runner (Unit, QTest, Functional, softfloat etc) +To run a single test, you can use the meson test runner from within your p= yvenv: +`./pyvenv/bin/meson test [testname]` +Example: `./pyvenv/bin/meson test qtest-x86_64/boot-serial-test` + +### TCG Tests +To run individual TCG tests for a specific architecture: +1. Navigate to the relevant build directory, e.g.: `cd tests/tcg/aarch64-s= oftmmu` +2. Run a specific test with make: `make run-[testname]` + Example: `make run-memory-sve` +3. Use `make help` within the architecture directory to see the full list = of available tests. + +### Functional Tests +Individual functional tests can be run directly using the run script altho= ugh from the source directory: +- **Example**: `./builds/all/run tests/functional/aarch64/test_virt_vbsa.p= y` + +### Environment Variables +- `V=3D1` for verbose output from tests. +- `SPEED=3Dslow` to run slower tests that are normally skipped. + +## Reporting Results +**Crucial**: After completing the build and test tasks, provide a concise = summary of the results to the calling agent. +1. **Summary**: State whether the build and tests passed or failed. +2. **Failure Excerpts**: If any task fails, include relevant excerpts from= the logs (e.g., compiler errors, test failures). +3. **Full Paths**: Always provide the **absolute file paths** to the full = logs and result sets for further inspection. + diff --git a/AGENTS.md b/AGENTS.md index 08bfe13ebd2..d9d1964d45a 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -26,6 +26,7 @@ security stance. In brief: You should use the following specialized skills for common tasks: - `qemu-code-explorer`: For finding where things are defined, how they're = used, or understanding a specific subsystem. - `qemu-build`: For configuring and building QEMU (including debug and san= itizer builds). +- `qemu-testing`: For finding, listing, and running individual tests (Unit= , QTest, Functional, TCG). =20 ## Source Code Layout (see `docs/devel/codebase.rst`) - **`accel/`**: Hardware accelerators (KVM, TCG, HVF, Xen, etc.) and archi= tecture-agnostic acceleration code. --=20 2.47.3