Skip to contentSkip to conversation

tests/tcg: use EXTRA_RUNS to run gdbtests

PATCH In review Alex Bennée 3 participants 3 messages Apr 20, 2020 – Apr 21, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/tcg: use EXTRA_RUNS to run gdbtests

With --enable-plugins the gdb tests confuse things somewhat as the plugin code attempts to enumerate tests with non-existent binaries. Fortunately we already have a mechanism for these extra tests that don't automatically include their own binaries. Use that mechanism and drop the unneeded .PHONY declarations.

---
 tests/tcg/aarch64/Makefile.target   | 5 ++---
 tests/tcg/cris/Makefile.target      | 1 +
 tests/tcg/multiarch/Makefile.target | 5 ++---
 3 files changed, 5 insertions(+), 6 deletions(-)
tests/tcg/aarch64/Makefile.target +2 -3
index d99b2a9eced..312f36cde5f 100644
@@ -54,9 +54,6 @@ sve-ioctls: CFLAGS+=-march=armv8.1-a+sve
 ifneq ($(HAVE_GDB_BIN),)
 GDB_SCRIPT=$(SRC_PATH)/tests/guest-debug/run-test.py
 
-AARCH64_TESTS += gdbstub-sysregs gdbstub-sve-ioctls
-
-.PHONY: gdbstub-sysregs gdbstub-sve-ioctls
 run-gdbstub-sysregs: sysregs
 	$(call run-test, $@, $(GDB_SCRIPT) \
 		--gdb $(HAVE_GDB_BIN) \
@@ -70,6 +67,8 @@ run-gdbstub-sve-ioctls: sve-ioctls
 		--qemu $(QEMU) --qargs "$(QEMU_OPTS)" \
 		--bin $< --test $(AARCH64_SRC)/gdbstub/test-sve-ioctl.py, \
 	"basic gdbstub SVE ZLEN support")
+
+EXTRA_RUNS += run-gdbstub-sysregs run-gdbstub-sve-ioctls
 endif
 
 endif
tests/tcg/cris/Makefile.target +1 -0
index 24c7f2e7616..e72d3cbdb23 100644
@@ -23,6 +23,7 @@ CRIS_RUNS = $(patsubst %, run-%, $(CRIS_USABLE_TESTS))
 
 # override the list of tests, as we can't build the multiarch tests
 TESTS = $(CRIS_USABLE_TESTS)
+EXTRA_RUNS =
 VPATH = $(CRIS_SRC)
 
 AS	= $(CC) -x assembler-with-cpp
tests/tcg/multiarch/Makefile.target +2 -3
index 47fd675aba5..51fb75ecfdd 100644
@@ -45,15 +45,14 @@ run-test-mmap-%: test-mmap
 ifneq ($(HAVE_GDB_BIN),)
 GDB_SCRIPT=$(SRC_PATH)/tests/guest-debug/run-test.py
 
-MULTIARCH_TESTS += gdbstub-sha1
-
-.PHONY: gdbstub-sha1
 run-gdbstub-sha1: sha1
 	$(call run-test, $@, $(GDB_SCRIPT) \
 		--gdb $(HAVE_GDB_BIN) \
 		--qemu $(QEMU) --qargs "$(QEMU_OPTS)" \
 		--bin $< --test $(MULTIARCH_SRC)/gdbstub/sha1.py, \
 	"basic gdbstub support")
+
+EXTRA_RUNS += run-gdbstub-sha1
 endif
 
 
Signature · 1 line
2.20.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Alex Bennée

With --enable-plugins the gdb tests confuse things somewhat as the plugin code attempts to enumerate tests with non-existent binaries. Fortunately we already have a mechanism for these extra tests that don't automatically include their own binaries. Use that mechanism and drop the unneeded .PHONY declarations.

Quoted 68 lines
---
 tests/tcg/aarch64/Makefile.target   | 5 ++---
 tests/tcg/cris/Makefile.target      | 1 +
 tests/tcg/multiarch/Makefile.target | 5 ++---
 3 files changed, 5 insertions(+), 6 deletions(-)
tests/tcg/aarch64/Makefile.target +2 -3
index d99b2a9eced..312f36cde5f 100644
@@ -54,9 +54,6 @@ sve-ioctls: CFLAGS+=-march=armv8.1-a+sve
 ifneq ($(HAVE_GDB_BIN),)
 GDB_SCRIPT=$(SRC_PATH)/tests/guest-debug/run-test.py
 
-AARCH64_TESTS += gdbstub-sysregs gdbstub-sve-ioctls
-
-.PHONY: gdbstub-sysregs gdbstub-sve-ioctls
 run-gdbstub-sysregs: sysregs
 	$(call run-test, $@, $(GDB_SCRIPT) \
 		--gdb $(HAVE_GDB_BIN) \
@@ -70,6 +67,8 @@ run-gdbstub-sve-ioctls: sve-ioctls
 		--qemu $(QEMU) --qargs "$(QEMU_OPTS)" \
 		--bin $< --test $(AARCH64_SRC)/gdbstub/test-sve-ioctl.py, \
 	"basic gdbstub SVE ZLEN support")
+
+EXTRA_RUNS += run-gdbstub-sysregs run-gdbstub-sve-ioctls
 endif
 
 endif
tests/tcg/cris/Makefile.target +1 -0
index 24c7f2e7616..e72d3cbdb23 100644
@@ -23,6 +23,7 @@ CRIS_RUNS = $(patsubst %, run-%, $(CRIS_USABLE_TESTS))
 
 # override the list of tests, as we can't build the multiarch tests
 TESTS = $(CRIS_USABLE_TESTS)
+EXTRA_RUNS =
 VPATH = $(CRIS_SRC)
 
 AS	= $(CC) -x assembler-with-cpp
tests/tcg/multiarch/Makefile.target +2 -3
index 47fd675aba5..51fb75ecfdd 100644
@@ -45,15 +45,14 @@ run-test-mmap-%: test-mmap
 ifneq ($(HAVE_GDB_BIN),)
 GDB_SCRIPT=$(SRC_PATH)/tests/guest-debug/run-test.py
 
-MULTIARCH_TESTS += gdbstub-sha1
-
-.PHONY: gdbstub-sha1
 run-gdbstub-sha1: sha1
 	$(call run-test, $@, $(GDB_SCRIPT) \
 		--gdb $(HAVE_GDB_BIN) \
 		--qemu $(QEMU) --qargs "$(QEMU_OPTS)" \
 		--bin $< --test $(MULTIARCH_SRC)/gdbstub/sha1.py, \
 	"basic gdbstub support")
+
+EXTRA_RUNS += run-gdbstub-sha1
 endif
 
 
Signature · 1 line
2.20.1
Reviewed-by on v1 1/1
#2 lore raw
In reply to Alex Bennée
Quoted 6 lines · Alex Bennée

With --enable-plugins the gdb tests confuse things somewhat as the plugin code attempts to enumerate tests with non-existent binaries. Fortunately we already have a mechanism for these extra tests that don't automatically include their own binaries. Use that mechanism and drop the unneeded .PHONY declarations.

Quoted 6 lines
---
 tests/tcg/aarch64/Makefile.target   | 5 ++---
 tests/tcg/cris/Makefile.target      | 1 +
 tests/tcg/multiarch/Makefile.target | 5 ++---
 3 files changed, 5 insertions(+), 6 deletions(-)

r~