diff options
author | dzwdz | 2024-08-17 17:19:10 +0200 |
---|---|---|
committer | dzwdz | 2024-08-17 17:19:10 +0200 |
commit | 35d62d227ea74e19eebcca3882dd8a97778736e7 (patch) | |
tree | ee0bc558663ac2e59c245d26ca76b421ef008ee3 /src/cmd/tests/kernel | |
parent | fa792166e13115b4262e8533da2839518df3bfe3 (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/cmd/tests/kernel')
-rw-r--r-- | src/cmd/tests/kernel/fs.c | 6 |
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); |