]> git.proxmox.com Git - mirror_qemu.git/blobdiff - tests/tcg/multiarch/Makefile.target
tests/tcg: Add the PROT_NONE gdbstub test
[mirror_qemu.git] / tests / tcg / multiarch / Makefile.target
index 373db696481590c1b321744a52d6ccbcaa7a8ba5..315a2e13588caae5e1c8aa3150f4db6577e98f6b 100644 (file)
@@ -63,41 +63,58 @@ 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 $(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)
 
+run-gdbstub-registers: sha512
+       $(call run-test, $@, $(GDB_SCRIPT) \
+               --gdb $(GDB) \
+               --qemu $(QEMU) --qargs "$(QEMU_OPTS)" \
+               --bin $< --test $(MULTIARCH_SRC)/gdbstub/registers.py, \
+       checking register enumeration)
+
+run-gdbstub-prot-none: prot-none
+       $(call run-test, $@, env PROT_NONE_PY=1 $(GDB_SCRIPT) \
+               --gdb $(GDB) \
+               --qemu $(QEMU) --qargs "$(QEMU_OPTS)" \
+               --bin $< --test $(MULTIARCH_SRC)/gdbstub/prot-none.py, \
+       accessing PROT_NONE memory)
+
 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-thread-breakpoint
+             run-gdbstub-proc-mappings run-gdbstub-thread-breakpoint \
+             run-gdbstub-registers run-gdbstub-prot-none
 
 # ARM Compatible Semi Hosting Tests
 #