Skip to contentSkip to conversation

tests/tcg/s390x: Test SIGILL and SIGSEGV handling

PATCH Superseded Ilya Leoshkevich 1 participant 1 message Aug 3, 2021

v7 of 8 Superseded Latest is v8 →

lore
Share & tools
lore
#0 lore raw

PATCH v7 1/1 tests/tcg/s390x: Test SIGILL and SIGSEGV handling

Verify that s390x-specific uc_mcontext.psw.addr is reported correctly and that signal handling interacts properly with debugging.

---

v6: https://lists.nongnu.org/archive/html/qemu-devel/2021-07/msg00873.html
v6 -> v7: Rebased.

 tests/tcg/s390x/Makefile.target               |  16 +-
 tests/tcg/s390x/gdbstub/test-signals-s390x.py |  76 ++++++++
 tests/tcg/s390x/signals-s390x.c               | 165 ++++++++++++++++++
 3 files changed, 256 insertions(+), 1 deletion(-)
 create mode 100644 tests/tcg/s390x/gdbstub/test-signals-s390x.py
 create mode 100644 tests/tcg/s390x/signals-s390x.c
tests/tcg/s390x/Makefile.target +15 -1
index 5d3de1b27a..5d984294f6 100644
@@ -1,4 +1,5 @@
-VPATH+=$(SRC_PATH)/tests/tcg/s390x
+S390X_SRC=$(SRC_PATH)/tests/tcg/s390x
+VPATH+=$(S390X_SRC)
 CFLAGS+=-march=zEC12 -m64
 TESTS+=hello-s390x
 TESTS+=csst
@@ -8,4 +9,17 @@ TESTS+=exrl-trtr
 TESTS+=pack
 TESTS+=mvo
 TESTS+=mvc
+TESTS+=signals-s390x
 
+ifneq ($(HAVE_GDB_BIN),)
+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) \
+		--qemu $(QEMU) --qargs "$(QEMU_OPTS)" \
+		--bin $< --test $(S390X_SRC)/gdbstub/test-signals-s390x.py, \
+	"mixing signals and debugging on s390x")
+
+EXTRA_RUNS += run-gdbstub-signals-s390x
+endif
tests/tcg/s390x/gdbstub/test-signals-s390x.py new file +76 -0

76 lines not on this page · raw message

tests/tcg/s390x/signals-s390x.c new file +165 -0

165 lines not on this page · raw message

Signature · 1 line
2.31.1