diff options
author | dzwdz | 2024-07-11 21:43:50 +0200 |
---|---|---|
committer | dzwdz | 2024-07-11 21:43:50 +0200 |
commit | ed8ff1ff9c4c0f847ffc2ab4624bd999539a0890 (patch) | |
tree | 7dd5ad530f65fb09f6f0ce6c4d94efa2fc2d05d7 /src/cmd/tests/kernel/fs.c | |
parent | 8138ba97608ff0cd4e443994390f277eca3d7b28 (diff) |
kernel: start cleaning up VfsRequest
* I'm being more strict about the linked list state to hopefully ensure
I'm not leaking any references.
* vfsreq_create was renamed to vfsreq_dispatchcopy as that name feels more
clear. It copies its argument, and dispatches it.
* Requests for user backends are now handled more like requests for kernel
backends - there's an accept() function that accepts a request.
Diffstat (limited to 'src/cmd/tests/kernel/fs.c')
-rw-r--r-- | src/cmd/tests/kernel/fs.c | 8 |
1 files changed, 4 insertions, 4 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); } } |