Skip to content

Commit f99212e

Browse files
committed
CI: Add MMU test suite
1 parent 3070021 commit f99212e

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/pgfault/
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
@@ -299,6 +299,16 @@ misalign-in-blk-emu: $(BIN)
299299
exit 1; \
300300
fi;
301301

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

0 commit comments

Comments
 (0)