qemu-e2k/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
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
i386 tests/tcg: ensure -cpu max also used for plugin run 2020-06-16 14:49:05 +01:00
lm32
m68k
minilib
mips
multiarch tests/tcg: add new threadcount test 2020-05-27 14:26:49 +01:00
openrisc
ppc
s390x
sh4
sparc64
x86_64 tests/tcg: remove extraneous pasting macros 2020-04-07 16:19:49 +01:00
xtensa
.gitignore
configure.sh tests/docker: use a gcc-10 based image for arm64 tests 2020-05-27 14:26:49 +01:00
Makefile.prereqs
Makefile.qemu
Makefile.target plugins: new lockstep plugin for debugging TCG changes 2020-06-16 14:49:05 +01:00
README

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".