21750c3c89
We already do a couple of "info registers" for specific tests but this is a more comprehensive multiarch test. It also has some output helpful for debugging the gdbstub by showing which XML features are advertised and what the underlying register numbers are. My initial motivation was to see if there are any duplicate register names exposed via the gdbstub while I was reviewing the proposed register interface for TCG plugins. Mismatches between the xml and remote-desc are reported for debugging but do not fail the test. We also skip the tests for the following arches for now until we can investigate and fix any issues: - s390x (fails to read v0l->v15l, not seen in remote-registers) - ppc64 (fails to read vs0h->vs31h, not seen in remote-registers) Cc: Akihiko Odaki <akihiko.odaki@daynix.com> Cc: Luis Machado <luis.machado@linaro.org> Cc: Ilya Leoshkevich <iii@linux.ibm.com> Cc: qemu-s390x@nongnu.org Cc: Nicholas Piggin <npiggin@gmail.com> Cc: Daniel Henrique Barboza <danielhb413@gmail.com> Cc: qemu-ppc@nongnu.org Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20231106185112.2755262-7-alex.bennee@linaro.org>
68 lines
2.3 KiB
Makefile
68 lines
2.3 KiB
Makefile
# -*- Mode: makefile -*-
|
|
#
|
|
# Multiarch system tests
|
|
#
|
|
# We just collect the tests together here and rely on the actual guest
|
|
# architecture to add to the test dependencies and deal with the
|
|
# complications of building.
|
|
#
|
|
|
|
MULTIARCH_SRC=$(SRC_PATH)/tests/tcg/multiarch
|
|
MULTIARCH_SYSTEM_SRC=$(MULTIARCH_SRC)/system
|
|
VPATH+=$(MULTIARCH_SYSTEM_SRC)
|
|
|
|
MULTIARCH_TEST_SRCS=$(wildcard $(MULTIARCH_SYSTEM_SRC)/*.c)
|
|
MULTIARCH_TESTS = $(patsubst $(MULTIARCH_SYSTEM_SRC)/%.c, %, $(MULTIARCH_TEST_SRCS))
|
|
|
|
ifneq ($(GDB),)
|
|
GDB_SCRIPT=$(SRC_PATH)/tests/guest-debug/run-test.py
|
|
|
|
run-gdbstub-memory: memory
|
|
$(call run-test, $@, $(GDB_SCRIPT) \
|
|
--gdb $(GDB) \
|
|
--qemu $(QEMU) \
|
|
--output $<.gdb.out \
|
|
--qargs \
|
|
"-monitor none -display none -chardev file$(COMMA)path=$<.out$(COMMA)id=output $(QEMU_OPTS)" \
|
|
--bin $< --test $(MULTIARCH_SRC)/gdbstub/memory.py, \
|
|
softmmu gdbstub support)
|
|
run-gdbstub-interrupt: interrupt
|
|
$(call run-test, $@, $(GDB_SCRIPT) \
|
|
--gdb $(GDB) \
|
|
--qemu $(QEMU) \
|
|
--output $<.gdb.out \
|
|
--qargs \
|
|
"-smp 2 -monitor none -display none -chardev file$(COMMA)path=$<.out$(COMMA)id=output $(QEMU_OPTS)" \
|
|
--bin $< --test $(MULTIARCH_SRC)/gdbstub/interrupt.py, \
|
|
softmmu gdbstub support)
|
|
run-gdbstub-untimely-packet: hello
|
|
$(call run-test, $@, $(GDB_SCRIPT) \
|
|
--gdb $(GDB) \
|
|
--gdb-args "-ex 'set debug remote 1'" \
|
|
--output untimely-packet.gdb.out \
|
|
--stderr untimely-packet.gdb.err \
|
|
--qemu $(QEMU) \
|
|
--bin $< --qargs \
|
|
"-monitor none -display none -chardev file$(COMMA)path=untimely-packet.out$(COMMA)id=output $(QEMU_OPTS)", \
|
|
softmmu gdbstub untimely packets)
|
|
$(call quiet-command, \
|
|
(! grep -Fq 'Packet instead of Ack, ignoring it' untimely-packet.gdb.err), \
|
|
"GREP", file untimely-packet.gdb.err)
|
|
|
|
run-gdbstub-registers: memory
|
|
$(call run-test, $@, $(GDB_SCRIPT) \
|
|
--gdb $(GDB) \
|
|
--qemu $(QEMU) \
|
|
--output $<.registers.gdb.out \
|
|
--qargs \
|
|
"-monitor none -display none -chardev file$(COMMA)path=$<.out$(COMMA)id=output $(QEMU_OPTS)" \
|
|
--bin $< --test $(MULTIARCH_SRC)/gdbstub/registers.py, \
|
|
softmmu gdbstub support)
|
|
else
|
|
run-gdbstub-%:
|
|
$(call skip-test, "gdbstub test $*", "need working gdb with $(patsubst -%,,$(TARGET_NAME)) support")
|
|
endif
|
|
|
|
MULTIARCH_RUNS += run-gdbstub-memory run-gdbstub-interrupt \
|
|
run-gdbstub-untimely-packet run-gdbstub-registers
|