This test aims at catching API misbehaviour w.r.t. the interaction
between interrupts and memory accesses, such as the bug fixed in
27f347e6a1
(accel/tcg: also suppress asynchronous IRQs for cpu_io_recompile)
Because the condition for triggering misbehaviour may not be
deterministic and the cross-section between memory accesses and
interrupt handlers may be small, we have to place our trust in large
numbers. Instead of guessing/trying an arbitrary, fixed loop-bound, we
decided to loop for a fixed amount of real-time. This avoids the test
running into a time-out on slower machines while enabling a high number
of possible interactions on faster machines.
The test program sends a single '.' per 1000000 loads/stores over the
serial. This output is not captured, but may be used by developers to
gauge the number of possible interactions.
Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Signed-off-by: Julian Ganz <neither@nut.email>
Message-ID: <20251027110344.2289945-32-alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
40 lines
1 KiB
Text
40 lines
1 KiB
Text
#
|
|
# RISC-V system tests
|
|
#
|
|
|
|
TEST_SRC = $(SRC_PATH)/tests/tcg/riscv64
|
|
VPATH += $(TEST_SRC)
|
|
|
|
LINK_SCRIPT = $(TEST_SRC)/semihost.ld
|
|
LDFLAGS = -T $(LINK_SCRIPT)
|
|
CFLAGS += -g -Og
|
|
|
|
%.o: %.S
|
|
$(CC) $(CFLAGS) $< -Wa,--noexecstack -c -o $@
|
|
%: %.o $(LINK_SCRIPT)
|
|
$(LD) $(LDFLAGS) $< -o $@
|
|
|
|
QEMU_OPTS += -M virt -display none -semihosting -device loader,file=
|
|
|
|
EXTRA_RUNS += run-issue1060
|
|
run-issue1060: issue1060
|
|
$(call run-test, $<, $(QEMU) $(QEMU_OPTS)$<)
|
|
|
|
EXTRA_RUNS += run-test-mepc-masking
|
|
run-test-mepc-masking: test-mepc-masking
|
|
$(call run-test, $<, $(QEMU) $(QEMU_OPTS)$<)
|
|
|
|
EXTRA_RUNS += run-plugin-doubletrap
|
|
run-plugin-doubletrap: doubletrap
|
|
$(call run-test, $<, \
|
|
$(QEMU) -plugin ../plugins/libdiscons.so -d plugin -D $<.pout \
|
|
$(QEMU_OPTS)$<)
|
|
|
|
EXTRA_RUNS += run-plugin-interruptedmemory
|
|
run-plugin-interruptedmemory: interruptedmemory
|
|
$(call run-test, $<, \
|
|
$(QEMU) -plugin ../plugins/libdiscons.so -d plugin -D $<.pout \
|
|
$(QEMU_OPTS)$<)
|
|
|
|
# We don't currently support the multiarch system tests
|
|
undefine MULTIARCH_TESTS
|