bcbc36a98f
Currently when we encounter a gdb that is old or not built with multiarch in mind we fail rather messily. Try and improve the situation by probing ahead of time and setting HOST_GDB_SUPPORTS_ARCH=y in the relevant tcg configs. We can then skip and give a more meaningful message if we don't run the test. Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20230302190846.2593720-24-alex.bennee@linaro.org> Message-Id: <20230303025805.625589-24-richard.henderson@linaro.org>
40 lines
1.1 KiB
Makefile
40 lines
1.1 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 dependancies 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 ($(HAVE_GDB_BIN),)
|
|
ifeq ($(HOST_GDB_SUPPORTS_ARCH),y)
|
|
GDB_SCRIPT=$(SRC_PATH)/tests/guest-debug/run-test.py
|
|
|
|
run-gdbstub-memory: memory
|
|
$(call run-test, $@, $(GDB_SCRIPT) \
|
|
--gdb $(HAVE_GDB_BIN) \
|
|
--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)
|
|
else
|
|
run-gdbstub-%:
|
|
$(call skip-test, "gdbstub test $*", "no guest arch support")
|
|
endif
|
|
else
|
|
run-gdbstub-%:
|
|
$(call skip-test, "gdbstub test $*", "need working gdb")
|
|
endif
|
|
|
|
MULTIARCH_RUNS += run-gdbstub-memory
|