761e3c1088
This fix is implemented by having the vCont handler set the value of `gdbserver_state.c_cpu` if any threads are to be resumed. The specific CPU picked is arbitrarily from the ones to be resumed, but it should be okay, as all GDB cares about is that it is a resumed thread. Signed-off-by: Matheus Branco Borella <dark.ryu.550@gmail.com> Message-Id: <20230804182633.47300-2-dark.ryu.550@gmail.com> [AJB: style and whitespace fixes] Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1725 Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20230829161528.2707696-9-alex.bennee@linaro.org>
62 lines
2.0 KiB
Makefile
62 lines
2.0 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 ($(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)
|
|
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)
|
|
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)", \
|
|
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)
|
|
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 run-gdbstub-interrupt run-gdbstub-untimely-packet
|