On 7/7/26 00:32, Pierrick Bouvier wrote:
This series replaces 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 all architectures, including
user/system/multiarch-user/multiarch-system. It implements all requirements
listed on original thread [1].

[1] https://lore.kernel.org/qemu-devel/[email protected]/

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.

Series first introduce the meson machinery needed in tests/tcg/meson.build, step
by step. Then it adds support for all existing archs. Finally, we remove
Makefiles and configure bits.

Usage:

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

make tcg-tests

ninja clean
./pyvenv/bin/meson test aarch64-softmmu-asid2 --verbose
```

A few items were left for further work (out of scope for this series):
- xtensaeb: didn't find how to cross compile for this architecture with what we
   have now in container debian-xtensa-cross. Tips are welcome.

Cc'ing Max

- tricore: implemented but reverted as all tests seem to hang. To be
   investigated.

Cc'ing Parthiban

- riscv64/interruptedmemory.S is hanging. To be investigated.

Cc'ing qemu-riscv@

- i386/test-i386-fprem.c is deactivated for now. It's broken (output does not
   match bare metal result) and is the slowest test we have. To be refactored 
and
   fixed.

v3
--

- add all architectures
- reduce number of plugins tests (only add one test for each plugin from
   multiarch pool)
- add depends for executable - allow to depend on a custom target for generated
   headers (x86_64 mmx, avx)
- add new tests added since last version for aarch64 (mte + gpc)
- refactor series to keep all arch files at end
- add docker host architecture selection

v2
--

- s/mispell/misspell
- moved comment about why we remove 'lib' prefix for plugins
- if user declare a wrong entry in a dictionary, list possible keys
- build tests by default (with 'all' target), as long as cross compiler is
   natively installed, to avoid triggering a container build.
- reword some comments based on reviewers feedback
- always declare all tests and avoid "per config" errors (no 'if' in arch files)
- move compiler feature and gdb version checks directly in tests/tcg/meson.build
- add support for cross containers
- add top target 'tcg-tests' to rebuild all tests


Reply via email to