diff options
Diffstat (limited to 'src/user/app/tests/kernel/miscsyscall.c')
-rw-r--r-- | src/user/app/tests/kernel/miscsyscall.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/user/app/tests/kernel/miscsyscall.c b/src/user/app/tests/kernel/miscsyscall.c index a2eed24..66899b1 100644 --- a/src/user/app/tests/kernel/miscsyscall.c +++ b/src/user/app/tests/kernel/miscsyscall.c @@ -270,6 +270,11 @@ static void test_sleep(void) { } } +static void test_badopen(void) { + test(_syscall_open(TMPFILEPATH, strlen(TMPFILEPATH), OPEN_CREATE | OPEN_WRITE) >= 0); + test(_syscall_open(TMPFILEPATH, strlen(TMPFILEPATH), OPEN_CREATE) == -EINVAL); +} + void r_k_miscsyscall(void) { run_test(test_await); run_test(test_pipe); @@ -277,4 +282,5 @@ void r_k_miscsyscall(void) { run_test(test_dup); run_test(test_execbuf); run_test(test_sleep); + run_test(test_badopen); } |