ktest: Add minor fixes for kernel tests
authorBarret Rhoden <brho@cs.berkeley.edu>
Fri, 4 May 2018 21:41:39 +0000 (17:41 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Fri, 4 May 2018 22:35:44 +0000 (18:35 -0400)
The main thing is the convenience program 'ktest', which you can run via
ssh.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/kfs/bin/ktest [new file with mode: 0755]
kern/src/ktest/ktest.c

diff --git a/kern/kfs/bin/ktest b/kern/kfs/bin/ktest
new file mode 100755 (executable)
index 0000000..0b3c10c
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/sh
+dmesg -C
+echo ktest > '#regress/monctl'
+echo ""
+echo Tests complete
+dmesg | grep FAILED
index 98bc692..1b3c683 100644 (file)
@@ -41,6 +41,8 @@ void run_ktest_suite(struct ktest_suite *suite)
                        } else {
                                printk(fmt, "FAILED", test->name, et_s, et_us, ktest_msg);
                        }
+                       /* Some older tests disable IRQs */
+                       enable_irq();
                } else {
                        printk("\tDISABLED [%s]\n", test->name);
                }