Skip to content

Commit 99acca3

Browse files
committed
CI: Add MMU test suite
1 parent 93647e5 commit 99acca3

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ jobs:
6868
run: |
6969
make -C tests/system/alignment/
7070
make distclean && make ENABLE_EXT_C=0 ENABLE_SYSTEM=1 misalign-in-blk-emu -j$(nproc)
71+
- name: MMU test
72+
run: |
73+
make -C tests/system/mmu/
74+
make distclean && make ENABLE_SYSTEM=1 mmu-test -j$(nproc)
7175
- name: gdbstub test
7276
run: |
7377
make distclean && make ENABLE_GDBSTUB=1 gdbstub-test -j$(nproc)

Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,16 @@ misalign-in-blk-emu: $(BIN)
303303
exit 1; \
304304
fi;
305305

306+
EXPECTED_mmu = STORE PAGE FAULT TEST PASSED!
307+
mmu-test: $(BIN)
308+
$(Q)$(PRINTF) "Running vm.elf ... "; \
309+
if [ "$(shell $(BIN) tests/system/mmu/vm.elf | tail -n 2)" = "$(strip $(EXPECTED_mmu)) inferior exit code 0" ]; then \
310+
$(call notice, [OK]); \
311+
else \
312+
$(PRINTF) "Failed.\n"; \
313+
exit 1; \
314+
fi;
315+
306316
# Non-trivial demonstration programs
307317
ifeq ($(call has, SDL), 1)
308318
doom_action := (cd $(OUT); ../$(BIN) riscv32/doom)

0 commit comments

Comments
 (0)