summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordzwdz2021-11-04 07:55:00 +0000
committerdzwdz2021-11-04 07:55:00 +0000
commite8f94805c9da44de35c6d4aedc253f1da6bd2bbd (patch)
tree40969e5b5562ba4f0f1c6776f857c00b178b27c2
parentd9b7a1a5d222a618b7530ecfa42b1ccb4f9a5f4c (diff)
init/tests: ensure that tests exit successfully
-rw-r--r--src/init/tests/main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/init/tests/main.c b/src/init/tests/main.c
index 239ed3e..eb7c23f 100644
--- a/src/init/tests/main.c
+++ b/src/init/tests/main.c
@@ -15,7 +15,11 @@ static void run_forked(void (*fn)()) {
if (!_syscall_fork()) {
fn();
_syscall_exit(0);
- } else _syscall_await();
+ } else {
+ /* successful tests must return 0
+ * TODO add a better fail msg */
+ if (_syscall_await() != 0) test_fail();
+ }
}