Merge tag 'pull-loongarch-20241016' of https://gitlab.com/gaosong/qemu into staging
[qemu/armbru.git] / tests / tcg / multiarch / system / Makefile.softmmu-target
blob07be001102bd5de0e33c3f92c14932ed1714492f
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))
17 ifneq ($(GDB),)
18 GDB_SCRIPT=$(SRC_PATH)/tests/guest-debug/run-test.py
20 run-gdbstub-memory: memory
21         $(call run-test, $@, $(GDB_SCRIPT) \
22                 --gdb $(GDB) \
23                 --qemu $(QEMU) \
24                 --output $<.gdb.out \
25                 --qargs \
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) \
31                 --gdb $(GDB) \
32                 --qemu $(QEMU) \
33                 --output $<.gdb.out \
34                 --qargs \
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) \
40                 --gdb $(GDB) \
41                 --gdb-args "-ex 'set debug remote 1'" \
42                 --output untimely-packet.gdb.out \
43                 --stderr untimely-packet.gdb.err \
44                 --qemu $(QEMU) \
45                 --bin $< --qargs \
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) \
54                 --gdb $(GDB) \
55                 --qemu $(QEMU) \
56                 --output $<.registers.gdb.out \
57                 --qargs \
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)
61 else
62 run-gdbstub-%:
63         $(call skip-test, "gdbstub test $*", "need working gdb with $(patsubst -%,,$(TARGET_NAME)) support")
64 endif
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