All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [RFC PATCH 06/10] .agents/skills: add qemu-testing skill
Date: Thu, 07 May 2026 12:57:37 +0100	[thread overview]
Message-ID: <875x4zmnym.fsf@draig.linaro.org> (raw)
In-Reply-To: <afxHRn6ft1ABjWDw@redhat.com> ("Daniel P. Berrangé"'s message of "Thu, 7 May 2026 09:03:18 +0100")

Daniel P. Berrangé <berrange@redhat.com> writes:

> On Tue, May 05, 2026 at 06:01:01PM +0100, Alex Bennée wrote:
>> This provides basic instructions for running tests.
>> 
>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>> ---
>>  .agents/skills/qemu-testing/SKILL.md | 53 ++++++++++++++++++++++++++++
>>  1 file changed, 53 insertions(+)
>>  create mode 100644 .agents/skills/qemu-testing/SKILL.md
>> 
>> diff --git a/.agents/skills/qemu-testing/SKILL.md b/.agents/skills/qemu-testing/SKILL.md
>> new file mode 100644
>> index 00000000000..3b7b42109e1
>> --- /dev/null
>> +++ b/.agents/skills/qemu-testing/SKILL.md
>> @@ -0,0 +1,53 @@
>> +---
>> +name: qemu-testing
>> +description: Provides instructions on how to find, list, and run
>> individual tests for QEMU (Unit, QTest, Functional, TCG). You MUST
>> use this skill whenever the user asks about tests, wants to list
>> available tests, or wants to run any test in a build directory, even
>> for simple exploratory queries like "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 running tests. Use the `qemu-build` skill if you need to
>> configure or run a build.
>> +
>> +## 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 context. You MUST ALWAYS launch them by spawning a sub-agent.
>> Pass the specific 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 touch 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, block, functional) can be individually selected and run via meson.
>> +
>> +As QEMU often needs a newer meson than the build host you should use the build `pyenv` to launch it:
>> +- **Example**: `./pyvenv/bin/meson test --suite thorough --list` to see what 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 pyvenv:
>> +`./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-softmmu`
>> +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 although from the source directory:
>> +- **Example**: `./builds/all/run tests/functional/aarch64/test_virt_vbsa.py`
>> +
>> +### Environment Variables
>> +- `V=1` for verbose output from tests.
>> +- `SPEED=slow` to run slower tests that are normally skipped.
>
> When I read this, I note there is some significant overlap with what
> we write in docs/devel/testing/. 
>
> Would it still be effective enough to merely point the agents to
> docs/devel/testing and get rid of most text in this section ?

The intention of skills is to be as concise as possible to save on token
cost. We could certainly put a link to the main document so it can read
it for more details if needed.

>
>> +
>> +## 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.
>
> With regards,
> Daniel

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro


  reply	other threads:[~2026-05-07 11:58 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-05 17:00 [RFC PATCH 00/10] AGENTS.md and associated skills Alex Bennée
2026-05-05 17:00 ` [RFC PATCH 01/10] AGENTS.md: add basic AGENTS.md for QEMU Alex Bennée
2026-05-06  8:49   ` Philippe Mathieu-Daudé
2026-05-05 17:00 ` [RFC PATCH 02/10] .agents/skills: add qemu-code-explorer skill Alex Bennée
2026-05-05 17:00 ` [RFC PATCH 03/10] .agents/skills: add qemu-code-reviewer skill Alex Bennée
2026-05-06  8:25   ` Philippe Mathieu-Daudé
2026-05-05 17:00 ` [RFC PATCH 04/10] .agents/skills: add qemu-issue-helper skill Alex Bennée
2026-05-05 17:01 ` [RFC PATCH 05/10] .agents/skills: add qemu-build skill Alex Bennée
2026-05-06 15:48   ` Alejandro Jimenez
2026-05-06 16:38     ` Alex Bennée
2026-05-05 17:01 ` [RFC PATCH 06/10] .agents/skills: add qemu-testing skill Alex Bennée
2026-05-07  8:03   ` Daniel P. Berrangé
2026-05-07 11:57     ` Alex Bennée [this message]
2026-05-05 17:01 ` [RFC PATCH 07/10] .agents/skills: add skill to distil mail threads Alex Bennée
2026-05-05 17:01 ` [RFC PATCH 08/10] .agents/skills: add qemu-issue-triage agent skill Alex Bennée
2026-05-07  8:25   ` Daniel P. Berrangé
2026-05-07  9:20     ` Philippe Mathieu-Daudé
2026-05-07  9:32       ` Daniel P. Berrangé
2026-05-07 12:32     ` Alex Bennée
2026-05-07 12:59       ` Peter Maydell
2026-05-07 13:46       ` Daniel P. Berrangé
2026-05-05 17:01 ` [RFC PATCH 09/10] .agents/skills: add checkpatch " Alex Bennée
2026-05-05 17:01 ` [RFC PATCH 10/10] MAINTAINERS: add a section for AI agents Alex Bennée
2026-05-07  8:59 ` [RFC PATCH 00/10] AGENTS.md and associated skills Peter Maydell
2026-05-07  9:24   ` Philippe Mathieu-Daudé
2026-05-07  9:27     ` Daniel P. Berrangé
2026-05-07  9:38   ` Daniel P. Berrangé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=875x4zmnym.fsf@draig.linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=berrange@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.