All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/27] tests/tcg: run tests with meson
@ 2026-06-09 21:47 Pierrick Bouvier
  2026-06-09 21:47 ` [PATCH 01/27] tests/tcg/multiarch/system/memory.c: remove unused variable Pierrick Bouvier
                   ` (28 more replies)
  0 siblings, 29 replies; 60+ messages in thread
From: Pierrick Bouvier @ 2026-06-09 21:47 UTC (permalink / raw)
  To: qemu-devel
  Cc: Thomas Huth, Paolo Bonzini, Manos Pitsidianakis,
	Daniel P . Berrangé, Philippe Mathieu-Daudé, qemu-arm,
	Richard Henderson, Alex Bennée, Alexandre Iooss,
	Pierrick Bouvier, Peter Maydell, Gustavo Romero

This series is an experiment to replace TCG tests makefiles with meson, with the
goal of having something more readable and maintainable in the long term.
Also it closes the gap that tcg tests had with the rest of tests, by integrating
them with meson directly.

It covers all existing tests for aarch64 architecture, including
user/system/multiarch-user/multiarch-system. I'll carry the effort to port all
other architectures once we agree on a base. We agreed with Alex to not merge
anything before all arch are covered.

Series first declare the global infrastructure, then add aarch64 and multiarch
tests, and finally plugin tests.

For review, I would suggest to start with aarch64 patches (end of the series) to
get an idea of what they will look like, before the implementation itself. You
can also compare that to existing Makefiles, they follow the same order.

It implements all requirements listed on original thread [1], except cross
container support, which can be easily added on top once we agree on the base.
[1] https://lore.kernel.org/qemu-devel/87wlwfsay4.fsf@draig.linaro.org/

We also have for free:
- correct and complete dependencies for any test, including:
  scripts, c.inc, headers, reference files and binaries/plugins.
- catch test declaration issues at configure time vs test time.
- proper data types for variables instead of string expansion with make.
- we could now build tests binaries by default with 'all' target.
- hopefully, better readability to your taste.

Main ideas for the current design are:
- make arch files as simple and explicit as possible. If it conflicts,
  always pick explicit, as long as we don't expose meson details.
  remove any kind of "skip, override, filter" logic.
- never expose custom_target and meson details in arch files.
- catch any spelling mistake on test or any dependency.
- keep complexity contained in tests/tcg/meson.build.

Usage:

```
make check-tcg
make check-tcg-aarch64-linux-user
make check-tcg-aarch64-softmmu

from build folder:
./pyvenv/bin/meson test --list --suite tcg
ninja clean
./pyvenv/bin/meson test aarch64-softmmu-asid2 --verbose
```

Pierrick Bouvier (27):
  tests/tcg/multiarch/system/memory.c: remove unused variable
  tests/tcg/multiarch/plugin/check-plugin-output.sh: take test output as
    input
  tests/tcg/multiarch/plugin: rename check-plugin-output to
    regex-compare
  tests/tcg: introduce meson.build
  tests/tcg/meson.build: introduce exe_name
  tests/tcg/meson.build: introduce test_name
  tests/tcg/meson.build: introduce cflags
  tests/tcg/meson.build: introduce qemu_args
  tests/tcg/meson.build: introduce env_var
  tests/tcg/plugins: build list of test_plugins
  tests/tcg/meson.build: introduce plugin_test
  tests/tcg/meson.build: test gdb support and introduce gdb_arch
  tests/tcg/meson.build: introduce gdb_test
  tests/tcg/meson.build: add default flag for testing compiler support
  tests/tcg/meson.build: introduce wrapper
  tests/tcg/meson.build: introduce expected_output
  tests/tcg/meson.build: add wrapper run_and_check_forbidden_output
  tests/tcg/meson.build: add wrapper run_with_input
  tests/tcg/meson.build: add wrapper record_replay
  tests/tcg/meson.build: add wrapper check_plugin_output
  tests/tcg/aarch64: add user tests
  tests/tcg/aarch64: add system tests
  tests/tcg/multiarch: declare user tests
  tests/tcg/aarch64: add multiarch user tests
  tests/tcg/multiarch: declare system tests
  tests/tcg/aarch64: add multiarch system tests
  tests/tcg/meson.build: add generic plugin tests

 tests/meson.build                             |   2 +-
 tests/tcg/aarch64/meson.build                 | 248 ++++++++++++++++
 tests/tcg/aarch64/system/meson.build          | 100 +++++++
 tests/tcg/meson.build                         | 276 ++++++++++++++++++
 tests/tcg/multiarch/Makefile.target           |   3 +-
 tests/tcg/multiarch/meson.build               | 149 ++++++++++
 .../multiarch/plugin/check-plugin-output.sh   |  36 ---
 tests/tcg/multiarch/plugin/regex-compare.sh   |  28 ++
 tests/tcg/multiarch/sha1.ref                  |   1 +
 tests/tcg/multiarch/system/memory.c           |   3 +-
 tests/tcg/multiarch/system/meson.build        |  53 ++++
 tests/tcg/plugins/meson.build                 |  11 +-
 tests/tcg/scripts/check_plugin_output.sh      |  19 ++
 tests/tcg/scripts/record_replay.sh            |  16 +
 .../scripts/run_and_check_forbidden_output.sh |  19 ++
 tests/tcg/scripts/run_and_diff.sh             |  12 +
 tests/tcg/scripts/run_with_input.sh           |  12 +
 17 files changed, 943 insertions(+), 45 deletions(-)
 create mode 100644 tests/tcg/aarch64/meson.build
 create mode 100644 tests/tcg/aarch64/system/meson.build
 create mode 100644 tests/tcg/meson.build
 create mode 100644 tests/tcg/multiarch/meson.build
 delete mode 100755 tests/tcg/multiarch/plugin/check-plugin-output.sh
 create mode 100755 tests/tcg/multiarch/plugin/regex-compare.sh
 create mode 100644 tests/tcg/multiarch/sha1.ref
 create mode 100644 tests/tcg/multiarch/system/meson.build
 create mode 100755 tests/tcg/scripts/check_plugin_output.sh
 create mode 100755 tests/tcg/scripts/record_replay.sh
 create mode 100755 tests/tcg/scripts/run_and_check_forbidden_output.sh
 create mode 100755 tests/tcg/scripts/run_and_diff.sh
 create mode 100755 tests/tcg/scripts/run_with_input.sh

-- 
2.43.0



^ permalink raw reply	[flat|nested] 60+ messages in thread

end of thread, other threads:[~2026-06-10 18:42 UTC | newest]

Thread overview: 60+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-09 21:47 [PATCH 00/27] tests/tcg: run tests with meson Pierrick Bouvier
2026-06-09 21:47 ` [PATCH 01/27] tests/tcg/multiarch/system/memory.c: remove unused variable Pierrick Bouvier
2026-06-10  0:35   ` Richard Henderson
2026-06-09 21:47 ` [PATCH 02/27] tests/tcg/multiarch/plugin/check-plugin-output.sh: take test output as input Pierrick Bouvier
2026-06-10  0:38   ` Richard Henderson
2026-06-09 21:47 ` [PATCH 03/27] tests/tcg/multiarch/plugin: rename check-plugin-output to regex-compare Pierrick Bouvier
2026-06-10  0:39   ` Richard Henderson
2026-06-09 21:47 ` [PATCH 04/27] tests/tcg: introduce meson.build Pierrick Bouvier
2026-06-10  4:30   ` Pierrick Bouvier
2026-06-09 21:47 ` [PATCH 05/27] tests/tcg/meson.build: introduce exe_name Pierrick Bouvier
2026-06-10  7:03   ` Manos Pitsidianakis
2026-06-10 18:32     ` Pierrick Bouvier
2026-06-09 21:47 ` [PATCH 06/27] tests/tcg/meson.build: introduce test_name Pierrick Bouvier
2026-06-10  7:08   ` Manos Pitsidianakis
2026-06-10 18:34     ` Pierrick Bouvier
2026-06-09 21:47 ` [PATCH 07/27] tests/tcg/meson.build: introduce cflags Pierrick Bouvier
2026-06-10  7:12   ` Manos Pitsidianakis
2026-06-09 21:47 ` [PATCH 08/27] tests/tcg/meson.build: introduce qemu_args Pierrick Bouvier
2026-06-10  7:14   ` Manos Pitsidianakis
2026-06-10  8:46   ` Philippe Mathieu-Daudé
2026-06-09 21:47 ` [PATCH 09/27] tests/tcg/meson.build: introduce env_var Pierrick Bouvier
2026-06-10  7:14   ` Manos Pitsidianakis
2026-06-09 21:47 ` [PATCH 10/27] tests/tcg/plugins: build list of test_plugins Pierrick Bouvier
2026-06-10  7:15   ` Manos Pitsidianakis
2026-06-09 21:47 ` [PATCH 11/27] tests/tcg/meson.build: introduce plugin_test Pierrick Bouvier
2026-06-10  7:17   ` Manos Pitsidianakis
2026-06-10 18:35     ` Pierrick Bouvier
2026-06-09 21:47 ` [PATCH 12/27] tests/tcg/meson.build: test gdb support and introduce gdb_arch Pierrick Bouvier
2026-06-10  7:20   ` Manos Pitsidianakis
2026-06-09 21:47 ` [PATCH 13/27] tests/tcg/meson.build: introduce gdb_test Pierrick Bouvier
2026-06-10  7:23   ` Manos Pitsidianakis
2026-06-09 21:47 ` [PATCH 14/27] tests/tcg/meson.build: add default flag for testing compiler support Pierrick Bouvier
2026-06-10  8:34   ` Philippe Mathieu-Daudé
2026-06-09 21:47 ` [PATCH 15/27] tests/tcg/meson.build: introduce wrapper Pierrick Bouvier
2026-06-10  8:33   ` Philippe Mathieu-Daudé
2026-06-09 21:47 ` [PATCH 16/27] tests/tcg/meson.build: introduce expected_output Pierrick Bouvier
2026-06-10  4:30   ` Pierrick Bouvier
2026-06-10  7:25     ` Manos Pitsidianakis
2026-06-10 18:40       ` Pierrick Bouvier
2026-06-09 21:47 ` [PATCH 17/27] tests/tcg/meson.build: add wrapper run_and_check_forbidden_output Pierrick Bouvier
2026-06-09 21:47 ` [PATCH 18/27] tests/tcg/meson.build: add wrapper run_with_input Pierrick Bouvier
2026-06-10  7:28   ` Manos Pitsidianakis
2026-06-10 18:42     ` Pierrick Bouvier
2026-06-09 21:47 ` [PATCH 19/27] tests/tcg/meson.build: add wrapper record_replay Pierrick Bouvier
2026-06-09 21:47 ` [PATCH 20/27] tests/tcg/meson.build: add wrapper check_plugin_output Pierrick Bouvier
2026-06-10  7:30   ` Manos Pitsidianakis
2026-06-10 17:09     ` Pierrick Bouvier
2026-06-09 21:47 ` [PATCH 21/27] tests/tcg/aarch64: add user tests Pierrick Bouvier
2026-06-10  0:18   ` Richard Henderson
2026-06-10  4:29     ` Pierrick Bouvier
2026-06-10  8:55     ` Paolo Bonzini
2026-06-09 21:47 ` [PATCH 22/27] tests/tcg/aarch64: add system tests Pierrick Bouvier
2026-06-09 21:47 ` [PATCH 23/27] tests/tcg/multiarch: declare user tests Pierrick Bouvier
2026-06-09 21:47 ` [PATCH 24/27] tests/tcg/aarch64: add multiarch " Pierrick Bouvier
2026-06-09 21:47 ` [PATCH 25/27] tests/tcg/multiarch: declare system tests Pierrick Bouvier
2026-06-09 21:47 ` [PATCH 26/27] tests/tcg/aarch64: add multiarch " Pierrick Bouvier
2026-06-09 21:47 ` [PATCH 27/27] tests/tcg/meson.build: add generic plugin tests Pierrick Bouvier
2026-06-09 22:10 ` [PATCH 00/27] tests/tcg: run tests with meson Pierrick Bouvier
2026-06-10  9:17 ` Paolo Bonzini
2026-06-10 17:01   ` Pierrick Bouvier

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.