summaryrefslogtreecommitdiff
path: root/src/init
diff options
context:
space:
mode:
authordzwdz2022-07-06 19:52:34 +0200
committerdzwdz2022-07-06 19:52:34 +0200
commitb935b0202ffeafcf775be96c95c8a67b62241a12 (patch)
tree6fd5b599491789661117a76aa52e28084ff72bf9 /src/init
parentcaec20e9886fd6d0437b59a9de48a7b686a2cc09 (diff)
kernel: don't panic on nonexistent syscalls
Diffstat (limited to 'src/init')
-rw-r--r--src/init/tests/main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/init/tests/main.c b/src/init/tests/main.c
index c59b390..0ac399b 100644
--- a/src/init/tests/main.c
+++ b/src/init/tests/main.c
@@ -133,6 +133,10 @@ static void test_malloc(void) {
free(p1);
}
+static void test_misc(void) {
+ assert(_syscall(~0, 0, 0, 0, 0) < 0); /* try making an invalid syscall */
+}
+
static void stress_fork(void) {
/* run a lot of processes */
for (size_t i = 0; i < 2048; i++) {
@@ -150,5 +154,6 @@ void test_all(void) {
run_forked(test_memflag);
run_forked(test_malloc);
run_forked(test_pipe);
+ run_forked(test_misc);
run_forked(stress_fork);
}