qemu/tests/tcg
Alex Bennée c81950a2f1 plugins: new lockstep plugin for debugging TCG changes
When we make changes to the TCG we sometimes cause regressions that
are deep into the execution cycle of the guest. Debugging this often
requires comparing large volumes of trace information to figure out
where behaviour has diverged.

The lockstep plugin utilises a shared socket so two QEMU's running
with the plugin will write their current execution position and wait
to receive the position of their partner process. When execution
diverges the plugins output where they were and the previous few
blocks before unloading themselves and letting execution continue.

Originally I planned for this to be most useful with -icount but it
turns out you can get divergence pretty quickly due to asynchronous
qemu_cpu_kick_rr_cpus() events causing one side to eventually run into
a short block a few cycles before the other side. For this reason I've
added a bit of tracking and I think the divergence reporting could be
finessed to report only if we really start to diverge in execution.

An example run would be:

  qemu-system-sparc -monitor none -parallel none -net none \
    -M SS-20 -m 256 -kernel day11/zImage.elf \
    -plugin ./tests/plugin/liblockstep.so,arg=lockstep-sparc.sock \
    -d plugin,nochain

with an identical command in another window in the same working
directory.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Robert Foley <robert.foley@linaro.org>
Tested-by: Robert Foley <robert.foley@linaro.org>
Cc: Richard Henderson <richard.henderson@linaro.org>
Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-Id: <20200610155509.12850-3-alex.bennee@linaro.org>
2020-06-16 14:49:05 +01:00
..
aarch64 tests/tcg: ensure -cpu max also used for plugin run 2020-06-16 14:49:05 +01:00
alpha tests/tcg: move configuration to a sub-shell script 2019-09-10 14:09:00 +01:00
arm tests/tcg: build plugin list from contents of src directory 2020-06-16 14:49:05 +01:00
cris tests/tcg: add a multiarch linux-user gdb test 2020-05-06 09:29:26 +01:00
hppa tests/tcg: move configuration to a sub-shell script 2019-09-10 14:09:00 +01:00
i386 tests/tcg: ensure -cpu max also used for plugin run 2020-06-16 14:49:05 +01:00
lm32 test: lm32: use semihosting for testing 2014-05-24 19:42:29 +02:00
m68k tests/tcg: move configuration to a sub-shell script 2019-09-10 14:09:00 +01:00
minilib tests/tcg: use EXTRA_CFLAGS everywhere 2019-09-10 09:38:33 +01:00
mips tests/tcg: move configuration to a sub-shell script 2019-09-10 14:09:00 +01:00
multiarch tests/tcg: add new threadcount test 2020-05-27 14:26:49 +01:00
openrisc target/openrisc: Rename the cpu from or32 to or1k 2017-02-14 08:14:58 +11:00
ppc tests/tcg: move configuration to a sub-shell script 2019-09-10 14:09:00 +01:00
s390x tests/tcg: target/s390x: Test MVC 2019-09-23 09:28:29 +02:00
sh4 tests/tcg: move configuration to a sub-shell script 2019-09-10 14:09:00 +01:00
sparc64 tests/tcg: move configuration to a sub-shell script 2019-09-10 14:09:00 +01:00
x86_64 tests/tcg: remove extraneous pasting macros 2020-04-07 16:19:49 +01:00
xtensa tests/tcg: move configuration to a sub-shell script 2019-09-10 14:09:00 +01:00
.gitignore tests/tcg: add .gitignore for in source builds 2019-09-10 14:14:31 +01:00
configure.sh tests/docker: use a gcc-10 based image for arm64 tests 2020-05-27 14:26:49 +01:00
Makefile.prereqs tests/tcg: ensure we re-configure if configure.sh is updated 2019-12-19 08:20:16 +00:00
Makefile.qemu tests/tcg: move configuration to a sub-shell script 2019-09-10 14:09:00 +01:00
Makefile.target plugins: new lockstep plugin for debugging TCG changes 2020-06-16 14:49:05 +01:00
README tests/tcg/README: fix location for lm32 tests 2018-10-26 17:17:32 +02:00

This directory contains various interesting guest programs for
regression testing. Tests are either multi-arch, meaning they can be
built for all guest architectures that support linux-user executable,
or they are architecture specific.

CRIS
====
The testsuite for CRIS is in tests/tcg/cris.  You can run it
with "make test-cris".

LM32
====
The testsuite for LM32 is in tests/tcg/lm32.  You can run it
with "make test-lm32".