diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-10-30 13:34:18 +0200 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-11-01 10:27:36 +0200 |
| commit | f139fff6ae7063c1965fa3085bb2585d7d838d72 (patch) | |
| tree | 7ee9f7c6a1ee09dba93c086cd66861474b821c97 /tests/scripts/gen-tests | |
| parent | b576c1d477bf476f277d32ecf60c312e4a97490d (diff) | |
| download | kmi-f139fff6ae7063c1965fa3085bb2585d7d838d72.tar.gz kmi-f139fff6ae7063c1965fa3085bb2585d7d838d72.zip | |
rpc actually marks and unmarks stack regions
+ Processes won't be able to read previous stack frames etc
Diffstat (limited to 'tests/scripts/gen-tests')
| -rwxr-xr-x | tests/scripts/gen-tests | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/scripts/gen-tests b/tests/scripts/gen-tests new file mode 100755 index 0000000..7095e30 --- /dev/null +++ b/tests/scripts/gen-tests @@ -0,0 +1,29 @@ +#!/bin/sh + +mkdir -p $(for d in "${@}"; do echo $d; done | sed "s|^|build/|") +mkdir -p $(for d in "${@}"; do echo $d; done | sed "s|^|reports/|") + +for NAME in "${@}"; do + echo "build/$NAME/init.d:" >> tests.mk + echo "-include build/$NAME/init.d" >> tests.mk + + echo "build/$NAME/init: $NAME/init.c \$(COMMON) \$(KMI)" >> tests.mk + echo " \$(COMPILE_TEST) $NAME/init.c \$(COMMON) -o build/$NAME/init" >> tests.mk + + echo "build/$NAME/initrd: build/$NAME/init" >> tests.mk + echo " echo build/$NAME/init | \$(GEN_INITRD) build/$NAME/initrd" >> tests.mk + + echo "reports/$NAME/log: build/$NAME/initrd" >> tests.mk + echo " timeout --foreground 30s \$(QEMU) \ + build/$NAME/initrd > reports/$NAME/log" >> tests.mk + + echo "reports/$NAME/OK: reports/$NAME/log" >> tests.mk + echo " grep 'BUG' reports/$NAME/log \\" >> tests.mk + echo " && echo 'BUG' > reports/$NAME/log \\" >> tests.mk + echo " || tail -n1 reports/$NAME/log | tr -d '\\\\r' \\" >> tests.mk + echo " > reports/$NAME/OK" >> tests.mk + + echo "TESTS += $NAME" >> tests.mk + echo ".PHONY: $NAME" >> tests.mk + echo "$NAME: reports/$NAME/OK" >> tests.mk +done |
