aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2023-09-28 10:44:56 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2023-10-18 10:01:01 +0200
commita47dd5c516ed7fff768554ac1ec4cba2145c5ea9 (patch)
tree1ee4324ee8478a00518085c4fbe006543855b1e1 /tests
parent730be6138e5efa949b351e2b649cc9b5d96dce7d (diff)
configure, tests/tcg: simplify GDB conditionals
Unify HAVE_GDB_BIN (currently in config-host.mak) and HOST_GDB_SUPPORTS_ARCH into a single GDB variable in config-target.mak. Reviewed-by: Emmanouil Pitsidianakis <manos.pitsidianakis@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/tcg/aarch64/Makefile.target6
-rw-r--r--tests/tcg/multiarch/Makefile.target18
-rw-r--r--tests/tcg/multiarch/system/Makefile.softmmu-target15
-rw-r--r--tests/tcg/s390x/Makefile.target6
4 files changed, 17 insertions, 28 deletions
diff --git a/tests/tcg/aarch64/Makefile.target b/tests/tcg/aarch64/Makefile.target
index d01b8ff47c..62b38c792f 100644
--- a/tests/tcg/aarch64/Makefile.target
+++ b/tests/tcg/aarch64/Makefile.target
@@ -105,19 +105,19 @@ sha512-sve: sha512.c
TESTS += sha512-sve
-ifeq ($(HOST_GDB_SUPPORTS_ARCH),y)
+ifneq ($(GDB),)
GDB_SCRIPT=$(SRC_PATH)/tests/guest-debug/run-test.py
run-gdbstub-sysregs: sysregs
$(call run-test, $@, $(GDB_SCRIPT) \
- --gdb $(HAVE_GDB_BIN) \
+ --gdb $(GDB) \
--qemu $(QEMU) --qargs "$(QEMU_OPTS)" \
--bin $< --test $(AARCH64_SRC)/gdbstub/test-sve.py, \
basic gdbstub SVE support)
run-gdbstub-sve-ioctls: sve-ioctls
$(call run-test, $@, $(GDB_SCRIPT) \
- --gdb $(HAVE_GDB_BIN) \
+ --gdb $(GDB) \
--qemu $(QEMU) --qargs "$(QEMU_OPTS)" \
--bin $< --test $(AARCH64_SRC)/gdbstub/test-sve-ioctl.py, \
basic gdbstub SVE ZLEN support)
diff --git a/tests/tcg/multiarch/Makefile.target b/tests/tcg/multiarch/Makefile.target
index 43bddeaf21..f3bfaf1a22 100644
--- a/tests/tcg/multiarch/Makefile.target
+++ b/tests/tcg/multiarch/Makefile.target
@@ -63,45 +63,39 @@ run-test-mmap: test-mmap
run-test-mmap-%: test-mmap
$(call run-test, test-mmap-$*, $(QEMU) -p $* $<, $< ($* byte pages))
-ifneq ($(HAVE_GDB_BIN),)
-ifeq ($(HOST_GDB_SUPPORTS_ARCH),y)
+ifneq ($(GDB),)
GDB_SCRIPT=$(SRC_PATH)/tests/guest-debug/run-test.py
run-gdbstub-sha1: sha1
$(call run-test, $@, $(GDB_SCRIPT) \
- --gdb $(HAVE_GDB_BIN) \
+ --gdb $(GDB) \
--qemu $(QEMU) --qargs "$(QEMU_OPTS)" \
--bin $< --test $(MULTIARCH_SRC)/gdbstub/sha1.py, \
basic gdbstub support)
run-gdbstub-qxfer-auxv-read: sha1
$(call run-test, $@, $(GDB_SCRIPT) \
- --gdb $(HAVE_GDB_BIN) \
+ --gdb $(GDB) \
--qemu $(QEMU) --qargs "$(QEMU_OPTS)" \
--bin $< --test $(MULTIARCH_SRC)/gdbstub/test-qxfer-auxv-read.py, \
basic gdbstub qXfer:auxv:read support)
run-gdbstub-proc-mappings: sha1
$(call run-test, $@, $(GDB_SCRIPT) \
- --gdb $(HAVE_GDB_BIN) \
+ --gdb $(GDB) \
--qemu $(QEMU) --qargs "$(QEMU_OPTS)" \
--bin $< --test $(MULTIARCH_SRC)/gdbstub/test-proc-mappings.py, \
proc mappings support)
run-gdbstub-thread-breakpoint: testthread
$(call run-test, $@, $(GDB_SCRIPT) \
- --gdb $(HAVE_GDB_BIN) \
+ --gdb $(GDB) \
--qemu $(QEMU) --qargs "$(QEMU_OPTS)" \
--bin $< --test $(MULTIARCH_SRC)/gdbstub/test-thread-breakpoint.py, \
hitting a breakpoint on non-main thread)
-
-else
-run-gdbstub-%:
- $(call skip-test, "gdbstub test $*", "no guest arch support")
-endif
else
run-gdbstub-%:
- $(call skip-test, "gdbstub test $*", "need working gdb")
+ $(call skip-test, "gdbstub test $*", "need working gdb with $(patsubst -%,,$(TARGET_NAME)) support")
endif
EXTRA_RUNS += run-gdbstub-sha1 run-gdbstub-qxfer-auxv-read \
run-gdbstub-proc-mappings run-gdbstub-thread-breakpoint
diff --git a/tests/tcg/multiarch/system/Makefile.softmmu-target b/tests/tcg/multiarch/system/Makefile.softmmu-target
index 90810a32b2..dee4f58dea 100644
--- a/tests/tcg/multiarch/system/Makefile.softmmu-target
+++ b/tests/tcg/multiarch/system/Makefile.softmmu-target
@@ -14,13 +14,12 @@ 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)
+ifneq ($(GDB),)
GDB_SCRIPT=$(SRC_PATH)/tests/guest-debug/run-test.py
run-gdbstub-memory: memory
$(call run-test, $@, $(GDB_SCRIPT) \
- --gdb $(HAVE_GDB_BIN) \
+ --gdb $(GDB) \
--qemu $(QEMU) \
--output $<.gdb.out \
--qargs \
@@ -29,7 +28,7 @@ run-gdbstub-memory: memory
softmmu gdbstub support)
run-gdbstub-interrupt: interrupt
$(call run-test, $@, $(GDB_SCRIPT) \
- --gdb $(HAVE_GDB_BIN) \
+ --gdb $(GDB) \
--qemu $(QEMU) \
--output $<.gdb.out \
--qargs \
@@ -38,7 +37,7 @@ run-gdbstub-interrupt: interrupt
softmmu gdbstub support)
run-gdbstub-untimely-packet: hello
$(call run-test, $@, $(GDB_SCRIPT) \
- --gdb $(HAVE_GDB_BIN) \
+ --gdb $(GDB) \
--gdb-args "-ex 'set debug remote 1'" \
--output untimely-packet.gdb.out \
--stderr untimely-packet.gdb.err \
@@ -51,11 +50,7 @@ run-gdbstub-untimely-packet: hello
"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")
+ $(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
diff --git a/tests/tcg/s390x/Makefile.target b/tests/tcg/s390x/Makefile.target
index c650aefe5c..826f0a18e4 100644
--- a/tests/tcg/s390x/Makefile.target
+++ b/tests/tcg/s390x/Makefile.target
@@ -81,12 +81,12 @@ $(Z15_TESTS): CFLAGS+=-march=z15 -O2
TESTS+=$(Z15_TESTS)
endif
-ifeq ($(HOST_GDB_SUPPORTS_ARCH),y)
+ifneq ($(GDB),)
GDB_SCRIPT=$(SRC_PATH)/tests/guest-debug/run-test.py
run-gdbstub-signals-s390x: signals-s390x
$(call run-test, $@, $(GDB_SCRIPT) \
- --gdb $(HAVE_GDB_BIN) \
+ --gdb $(GDB) \
--qemu $(QEMU) --qargs "$(QEMU_OPTS)" \
--bin $< --test $(S390X_SRC)/gdbstub/test-signals-s390x.py, \
mixing signals and debugging)
@@ -95,7 +95,7 @@ hello-s390x-asm: CFLAGS+=-nostdlib
run-gdbstub-svc: hello-s390x-asm
$(call run-test, $@, $(GDB_SCRIPT) \
- --gdb $(HAVE_GDB_BIN) \
+ --gdb $(GDB) \
--qemu $(QEMU) --qargs "$(QEMU_OPTS)" \
--bin $< --test $(S390X_SRC)/gdbstub/test-svc.py, \
single-stepping svc)