Commit 25aaf0cb7f (“tests/tcg: reduce the number of plugin test
combinations”) added support for running tests with specific plugins
passed via the EXTRA_RUNS variable.
However, due to the optimization, the rules generated as a shuffled
combination of tests and plugins might not cover the rules required to
run the tests with a specific plugin passed via EXTRA_RUNS.
This commit fixes it by correctly generating the rules for the tests
that require a specific plugin to run, which are now passed via the
EXTRA_RUNS_WITH_PLUGIN instead of via the EXTRA_RUNS variable.
The fix essentially excludes the tests passed via EXTRA_RUNS_WITH_PLUGIN
from the rules created by the shuffled combination of tests and plugins,
to avoid running the tests twice, and generates the rules for the
test/plugin combinations listed in the EXTRA_RUNS_WITH_PLUGIN variable.
Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Tested-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-id: 20250801001305.2352554-1-gustavo.romero@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
81 lines
2.9 KiB
Makefile
81 lines
2.9 KiB
Makefile
# -*- Mode: makefile -*-
|
|
#
|
|
# Multiarch system tests
|
|
#
|
|
# We just collect the tests together here and rely on the actual guest
|
|
# architecture to add to the test dependencies and deal with the
|
|
# complications of building.
|
|
#
|
|
# To support the multiarch guests the target arch needs to provide a
|
|
# boot.S that jumps to main and provides a __sys_outc functions.
|
|
# Remember to update MULTIARCH_SOFTMMU_TARGETS in the tcg test
|
|
# Makefile.target when this is done.
|
|
#
|
|
|
|
MULTIARCH_SRC=$(SRC_PATH)/tests/tcg/multiarch
|
|
MULTIARCH_SYSTEM_SRC=$(MULTIARCH_SRC)/system
|
|
VPATH+=$(MULTIARCH_SYSTEM_SRC)
|
|
|
|
MULTIARCH_TEST_SRCS=$(wildcard $(MULTIARCH_SYSTEM_SRC)/*.c)
|
|
MULTIARCH_TESTS = $(patsubst $(MULTIARCH_SYSTEM_SRC)/%.c, %, $(MULTIARCH_TEST_SRCS))
|
|
|
|
ifneq ($(GDB),)
|
|
GDB_SCRIPT=$(SRC_PATH)/tests/guest-debug/run-test.py
|
|
|
|
run-gdbstub-memory: memory
|
|
$(call run-test, $@, $(GDB_SCRIPT) \
|
|
--gdb $(GDB) \
|
|
--qemu $(QEMU) \
|
|
--output $<.gdb.out \
|
|
--qargs \
|
|
"-monitor none -display none -chardev file$(COMMA)path=$<.out$(COMMA)id=output $(QEMU_OPTS)" \
|
|
--bin $< --test $(MULTIARCH_SRC)/gdbstub/memory.py, \
|
|
softmmu gdbstub support)
|
|
run-gdbstub-interrupt: interrupt
|
|
$(call run-test, $@, $(GDB_SCRIPT) \
|
|
--gdb $(GDB) \
|
|
--qemu $(QEMU) \
|
|
--output $<.gdb.out \
|
|
--qargs \
|
|
"-smp 2 -monitor none -display none -chardev file$(COMMA)path=$<.out$(COMMA)id=output $(QEMU_OPTS)" \
|
|
--bin $< --test $(MULTIARCH_SRC)/gdbstub/interrupt.py, \
|
|
softmmu gdbstub support)
|
|
run-gdbstub-untimely-packet: hello
|
|
$(call run-test, $@, $(GDB_SCRIPT) \
|
|
--gdb $(GDB) \
|
|
--gdb-args "-ex 'set debug remote 1'" \
|
|
--output untimely-packet.gdb.out \
|
|
--stderr untimely-packet.gdb.err \
|
|
--qemu $(QEMU) \
|
|
--bin $< --qargs \
|
|
"-monitor none -display none -chardev file$(COMMA)path=untimely-packet.out$(COMMA)id=output $(QEMU_OPTS)", \
|
|
softmmu gdbstub untimely packets)
|
|
$(call quiet-command, \
|
|
(! grep -Fq 'Packet instead of Ack, ignoring it' untimely-packet.gdb.err), \
|
|
"GREP", file untimely-packet.gdb.err)
|
|
|
|
run-gdbstub-registers: memory
|
|
$(call run-test, $@, $(GDB_SCRIPT) \
|
|
--gdb $(GDB) \
|
|
--qemu $(QEMU) \
|
|
--output $<.registers.gdb.out \
|
|
--qargs \
|
|
"-monitor none -display none -chardev file$(COMMA)path=$<.out$(COMMA)id=output $(QEMU_OPTS)" \
|
|
--bin $< --test $(MULTIARCH_SRC)/gdbstub/registers.py, \
|
|
softmmu gdbstub support)
|
|
else
|
|
run-gdbstub-%:
|
|
$(call skip-test, "gdbstub test $*", "need working gdb with $(patsubst -%,,$(TARGET_NAME)) support")
|
|
endif
|
|
|
|
MULTIARCH_RUNS += run-gdbstub-memory run-gdbstub-interrupt \
|
|
run-gdbstub-untimely-packet run-gdbstub-registers
|
|
|
|
ifeq ($(CONFIG_PLUGIN),y)
|
|
# Test plugin memory access instrumentation
|
|
run-plugin-memory-with-libmem.so: memory libmem.so
|
|
run-plugin-memory-with-libmem.so: PLUGIN_ARGS=$(COMMA)region-summary=true
|
|
run-plugin-memory-with-libmem.so: CHECK_PLUGIN_OUTPUT_COMMAND=$(MULTIARCH_SYSTEM_SRC)/validate-memory-counts.py $@.out
|
|
|
|
EXTRA_RUNS_WITH_PLUGIN += run-plugin-memory-with-libmem.so
|
|
endif
|