summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordzwdz2024-08-17 17:19:10 +0200
committerdzwdz2024-08-17 17:19:10 +0200
commit35d62d227ea74e19eebcca3882dd8a97778736e7 (patch)
treeee0bc558663ac2e59c245d26ca76b421ef008ee3 /src
parentfa792166e13115b4262e8533da2839518df3bfe3 (diff)
tests: fix the bad_delegate test
It was closing the request handle... Now I'm guaranteeing an empty handle in a smarter way.
Diffstat (limited to 'src')
-rw-r--r--src/cmd/tests/kernel/fs.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cmd/tests/kernel/fs.c b/src/cmd/tests/kernel/fs.c
index 42b069f..f0444a6 100644
--- a/src/cmd/tests/kernel/fs.c
+++ b/src/cmd/tests/kernel/fs.c
@@ -87,8 +87,10 @@ static void test_bad_delegate(void) {
struct ufs_request res;
for (;;) {
h = _sys_fs_wait(NULL, 0, &res);
- _sys_close(0);
- _sys_fs_respond(h, NULL, 0, FSR_DELEGATE);
+ hid_t h2 = _sys_dup(h, -1, 0);
+ test(h2 >= 0);
+ _sys_close(h2);
+ _sys_fs_respond(h2, NULL, 0, FSR_DELEGATE);
}
} else {
test(0 <= h);