diff options
Diffstat (limited to 'src/cmd/tests')
-rw-r--r-- | src/cmd/tests/kernel/fs.c | 8 | ||||
-rw-r--r-- | src/cmd/tests/kernel/miscsyscall.c | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/cmd/tests/kernel/fs.c b/src/cmd/tests/kernel/fs.c index 6d4f4f4..a19f3fb 100644 --- a/src/cmd/tests/kernel/fs.c +++ b/src/cmd/tests/kernel/fs.c @@ -12,14 +12,14 @@ static void test_unfinished_req(void) { // TODO make a similar test with all 0s passed to fs_wait struct ufs_request res; _sys_fs_wait(NULL, 0, &res); - // TODO second fs_wait exit(0); } else { test(0 <= h); test(_sys_mount(h, "/", 1) == 0); - int ret = _sys_open("/", 1, 0); - test(ret < 0); - // the handler quits while handling that call - but this syscall should return anyways + /* the handler quits while handling this call */ + test(_sys_open("/", 1, 0) == -EPIPE); + /* now it's dead, at this shouldn't hang either */ + test(_sys_open("/", 1, 0) == -EPIPE); } } diff --git a/src/cmd/tests/kernel/miscsyscall.c b/src/cmd/tests/kernel/miscsyscall.c index 883fcee..c9daaf8 100644 --- a/src/cmd/tests/kernel/miscsyscall.c +++ b/src/cmd/tests/kernel/miscsyscall.c @@ -318,9 +318,9 @@ static void test_getnull(void) { test(_sys_fs_respond(h, buf, 16, 0) == -EBADF); /* making some assumptions about the testing environment here... */ - test(_sys_open("/test", 5, OPEN_READ) != -EGENERIC); - test(_sys_mount(h, "/test", 5) == 0); - test(_sys_open("/test", 5, OPEN_READ) == -EGENERIC); + test(_sys_open("/tmp/", 5, OPEN_READ) != -ENOENT); + test(_sys_mount(h, "/tmp/", 5) == 0); + test(_sys_open("/tmp/", 5, OPEN_READ) == -ENOENT); close(h); close(h2); |