test: on-hardware SMP self-test (revoke/kill must stop every hart) + make test-qemu

This commit is contained in:
2026-10-27 12:54:42 +01:00
parent 909b3f0503
commit b814bd9570
10 changed files with 262 additions and 12 deletions

View File

@@ -1,4 +1,4 @@
.PHONY: check fmt clippy test kani build all image run ci kernel-fmt kernel-clippy kernel-test
.PHONY: check fmt clippy test kani build all image run ci kernel-fmt kernel-clippy kernel-test test-qemu
RISCV_TARGET = riscv64gc-unknown-none-elf
KERNEL_BIN = target/$(RISCV_TARGET)/release/adapter-riscv
@@ -52,11 +52,17 @@ build:
cargo build --target $(RISCV_TARGET) --release \
-p adapter-riscv -p init -p echo -p snake \
-p display-qemu -p input-qemu -p storage-qemu \
-p log-server -p permission-manager -p session-server
-p log-server -p permission-manager -p session-server -p smptest
image: build
scripts/make-disk-image.sh
# Boots a test image (normal image + smptest.elf) on $(SMP) harts; init runs
# the SMP self-test and halts. Passes only on "SMPTEST PASS".
test-qemu: build
IMG=test.img SMPTEST=1 scripts/make-disk-image.sh > /dev/null
SMP=$(SMP) scripts/test-qemu.sh test.img
run: build
qemu-system-riscv64 -machine virt -smp $(SMP) -nographic -bios default \
-kernel $(KERNEL_BIN)