qemu/tests/tcg
Alex Bennée ecbcc9ead2 tests/tcg: add a system test to check memory instrumentation
At first I thought I could compile the user-mode test for system mode
however we already have a fairly comprehensive test case for system
mode in "memory" so lets use that.

As tracking every access will quickly build up with "print-access" we
add a new mode to track groups of reads and writes to regions. Because
the test_data is 16k aligned we can be sure all accesses to it are
ones we can count.

First we extend the test to report where the test_data region is. Then
we expand the pdot() function to track the total number of reads and
writes to the region. We have to add some addition pdot() calls to
take into account multiple reads/writes in the test loops.

Finally we add a python script to integrate the data from the plugin
and the output of the test and validate they both agree on the total
counts. As some boot codes clear the bss we also add a flag to add a
regions worth of writes to the expected total.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-Id: <20240916085400.1046925-14-alex.bennee@linaro.org>
2024-09-19 15:58:01 +01:00
..
aarch64 tests/tcg/aarch64: Extend MTE gdbstub tests to system mode 2024-09-10 23:34:03 +01:00
alpha tests/tcg: add a system test to check memory instrumentation 2024-09-19 15:58:01 +01:00
arm tests/tcg: Use --noexecstack with assembler files 2024-07-30 11:44:11 +01:00
hexagon Hexagon: fix F2_conv_* instructions for negative zero 2024-08-07 20:34:25 -07:00
hppa tests/tcg: Remove run-test-mmap-* 2024-02-29 11:35:37 -10:00
i386 tests/tcg: Use --noexecstack with assembler files 2024-07-30 11:44:11 +01:00
loongarch64 tests/tcg/loongarch64: Use --no-warn-rwx-segments to link system tests 2024-07-30 11:44:13 +01:00
m68k tests/tcg: Remove run-test-mmap-* 2024-02-29 11:35:37 -10:00
minilib tests/tcg/minilib: Constify digits in print_num 2024-07-05 12:33:41 +01:00
mips tests/tcg: Add -fno-stack-protector 2023-10-31 13:28:19 +00:00
multiarch tests/tcg: add a system test to check memory instrumentation 2024-09-19 15:58:01 +01:00
openrisc target/openrisc: Rename the cpu from or32 to or1k 2017-02-14 08:14:58 +11:00
plugins tests/tcg: add a system test to check memory instrumentation 2024-09-19 15:58:01 +01:00
ppc64 tests/tcg/multiarch: add test for plugin memory access 2024-09-19 15:58:01 +01:00
ppc64le tests/tcg: unify ppc64 and ppc64le Makefiles 2022-10-06 11:53:40 +01:00
riscv64 tests/tcg: Use --noexecstack with assembler files 2024-07-30 11:44:11 +01:00
s390x tests/tcg: add a system test to check memory instrumentation 2024-09-19 15:58:01 +01:00
sh4 target/sh4: Fix SUBV opcode 2024-05-03 17:33:26 +02:00
tricore tests/tcg: Reset result register after each test 2023-09-29 08:28:09 +02:00
x86_64 target/i386: Fix carry flag for BLSI 2024-08-21 09:11:26 +10:00
xtensa tests/tcg/xtensa: add icount/ibreak priority test 2024-01-19 12:28:59 +01:00
xtensaeb tcg: Correct invalid mentions of 'softmmu' by 'system-mode' 2023-10-07 19:02:33 +02:00
Makefile.target tests/tcg: allow to check output of plugins 2024-09-19 15:58:01 +01:00
README tests/tcg: update README 2024-07-30 11:44:18 +01:00

This directory contains various interesting guest binaries for
regression testing the Tiny Code Generator doing system and user-mode
emulation.

The multiarch directory contains shared code for tests that can be
built for all guest architectures. Architecture specific code can be
found in their respective directories.

System mode tests will be under the "system" subdirectories.

GDB scripts for exercising the gdbstub on specific tests will be found
under the "gdbstb" subdirectories.

See the developer guide for more instructions on "make check-tcg"