From 3f64b67fcb8841dabff82c14a540825bb717e6ab Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Tue, 5 Nov 2024 07:20:18 -0700 Subject: [PATCH] test/file-exit-unreg: fix wrong file registration check 2nd check should be that it's an error, eg less than zero... Fixes: 03726b418e58 ("test/file-exit-unreg: check defer tw file exit unregistration") Signed-off-by: Jens Axboe --- test/file-exit-unreg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/file-exit-unreg.c b/test/file-exit-unreg.c index 53b9a009c..2991f2320 100644 --- a/test/file-exit-unreg.c +++ b/test/file-exit-unreg.c @@ -37,7 +37,7 @@ int main(int argc, char *argv[]) ret = io_uring_register_files_tags(&ring, fds, tags, 2); if (ret == -EINVAL) { return T_EXIT_SKIP; - } else { + } else if (ret < 0) { fprintf(stderr, "file_register_init: %d\n", ret); return T_EXIT_FAIL; }