1 # -*- Mode: makefile -*-
3 # Multiarch system tests
5 # We just collect the tests together here and rely on the actual guest
6 # architecture to add to the test dependencies and deal with the
7 # complications of building.
10 MULTIARCH_SRC=$(SRC_PATH)/tests/tcg/multiarch
11 MULTIARCH_SYSTEM_SRC=$(MULTIARCH_SRC)/system
12 VPATH+=$(MULTIARCH_SYSTEM_SRC)
14 MULTIARCH_TEST_SRCS=$(wildcard $(MULTIARCH_SYSTEM_SRC)/*.c)
15 MULTIARCH_TESTS = $(patsubst $(MULTIARCH_SYSTEM_SRC)/%.c, %, $(MULTIARCH_TEST_SRCS))
18 GDB_SCRIPT=$(SRC_PATH)/tests/guest-debug/run-test.py
20 run-gdbstub-memory: memory
21 $(call run-test, $@, $(GDB_SCRIPT) \
26 "-monitor none -display none -chardev file$(COMMA)path=$<.out$(COMMA)id=output $(QEMU_OPTS)" \
27 --bin $< --test $(MULTIARCH_SRC)/gdbstub/memory.py, \
28 softmmu gdbstub support)
29 run-gdbstub-interrupt: interrupt
30 $(call run-test, $@, $(GDB_SCRIPT) \
35 "-smp 2 -monitor none -display none -chardev file$(COMMA)path=$<.out$(COMMA)id=output $(QEMU_OPTS)" \
36 --bin $< --test $(MULTIARCH_SRC)/gdbstub/interrupt.py, \
37 softmmu gdbstub support)
38 run-gdbstub-untimely-packet: hello
39 $(call run-test, $@, $(GDB_SCRIPT) \
41 --gdb-args "-ex 'set debug remote 1'" \
42 --output untimely-packet.gdb.out \
43 --stderr untimely-packet.gdb.err \
46 "-monitor none -display none -chardev file$(COMMA)path=untimely-packet.out$(COMMA)id=output $(QEMU_OPTS)", \
47 softmmu gdbstub untimely packets)
48 $(call quiet-command, \
49 (! grep -Fq 'Packet instead of Ack, ignoring it' untimely-packet.gdb.err), \
50 "GREP", file untimely-packet.gdb.err)
52 run-gdbstub-registers: memory
53 $(call run-test, $@, $(GDB_SCRIPT) \
56 --output $<.registers.gdb.out \
58 "-monitor none -display none -chardev file$(COMMA)path=$<.out$(COMMA)id=output $(QEMU_OPTS)" \
59 --bin $< --test $(MULTIARCH_SRC)/gdbstub/registers.py, \
60 softmmu gdbstub support)
63 $(call skip-test, "gdbstub test $*", "need working gdb with $(patsubst -%,,$(TARGET_NAME)) support")
66 MULTIARCH_RUNS += run-gdbstub-memory run-gdbstub-interrupt \
67 run-gdbstub-untimely-packet run-gdbstub-registers
69 # Test plugin memory access instrumentation
70 run-plugin-memory-with-libmem.so: \
71 PLUGIN_ARGS=$(COMMA)region-summary=true
72 run-plugin-memory-with-libmem.so: \
73 CHECK_PLUGIN_OUTPUT_COMMAND=$(MULTIARCH_SYSTEM_SRC)/validate-memory-counts.py $@.out