2019-04-29 17:38:44 +03:00
|
|
|
# -*- Mode: makefile -*-
|
|
|
|
#
|
|
|
|
# Multiarch system tests
|
|
|
|
#
|
|
|
|
# We just collect the tests together here and rely on the actual guest
|
2023-07-14 14:23:51 +03:00
|
|
|
# architecture to add to the test dependencies and deal with the
|
2019-04-29 17:38:44 +03:00
|
|
|
# complications of building.
|
|
|
|
#
|
|
|
|
|
2021-01-09 01:42:41 +03:00
|
|
|
MULTIARCH_SRC=$(SRC_PATH)/tests/tcg/multiarch
|
|
|
|
MULTIARCH_SYSTEM_SRC=$(MULTIARCH_SRC)/system
|
2019-04-29 17:38:44 +03:00
|
|
|
VPATH+=$(MULTIARCH_SYSTEM_SRC)
|
|
|
|
|
|
|
|
MULTIARCH_TEST_SRCS=$(wildcard $(MULTIARCH_SYSTEM_SRC)/*.c)
|
|
|
|
MULTIARCH_TESTS = $(patsubst $(MULTIARCH_SYSTEM_SRC)/%.c, %, $(MULTIARCH_TEST_SRCS))
|
2021-01-09 01:42:41 +03:00
|
|
|
|
|
|
|
ifneq ($(HAVE_GDB_BIN),)
|
2023-03-03 05:57:59 +03:00
|
|
|
ifeq ($(HOST_GDB_SUPPORTS_ARCH),y)
|
2021-01-09 01:42:41 +03:00
|
|
|
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, \
|
2022-09-29 14:42:03 +03:00
|
|
|
softmmu gdbstub support)
|
2023-08-29 19:15:24 +03:00
|
|
|
run-gdbstub-interrupt: interrupt
|
|
|
|
$(call run-test, $@, $(GDB_SCRIPT) \
|
|
|
|
--gdb $(HAVE_GDB_BIN) \
|
|
|
|
--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)
|
2023-05-04 18:37:32 +03:00
|
|
|
run-gdbstub-untimely-packet: hello
|
|
|
|
$(call run-test, $@, $(GDB_SCRIPT) \
|
|
|
|
--gdb $(HAVE_GDB_BIN) \
|
|
|
|
--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)", \
|
2023-08-29 19:15:19 +03:00
|
|
|
softmmu gdbstub untimely packets)
|
2023-05-04 18:37:32 +03:00
|
|
|
$(call quiet-command, \
|
|
|
|
(! grep -Fq 'Packet instead of Ack, ignoring it' untimely-packet.gdb.err), \
|
2023-08-29 19:15:19 +03:00
|
|
|
"GREP", file untimely-packet.gdb.err)
|
2023-03-03 05:57:59 +03:00
|
|
|
else
|
|
|
|
run-gdbstub-%:
|
|
|
|
$(call skip-test, "gdbstub test $*", "no guest arch support")
|
|
|
|
endif
|
2021-02-11 15:27:50 +03:00
|
|
|
else
|
|
|
|
run-gdbstub-%:
|
|
|
|
$(call skip-test, "gdbstub test $*", "need working gdb")
|
2021-01-09 01:42:41 +03:00
|
|
|
endif
|
2021-02-11 15:27:50 +03:00
|
|
|
|
2023-08-29 19:15:24 +03:00
|
|
|
MULTIARCH_RUNS += run-gdbstub-memory run-gdbstub-interrupt run-gdbstub-untimely-packet
|