summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2021-01-26 15:55:41 -0700
committerJens Axboe <axboe@kernel.dk>2021-01-26 15:55:41 -0700
commitc9e76e8376bdf5acb0e3df0a7a9e6d0d9312c60f (patch)
treee14f18acf674e87af8b2d6d9d2fdb39e25e76186
parent25ca5d25ef974c40fe367f983d16b58296e5065d (diff)
downloadliburing-c9e76e8376bdf5acb0e3df0a7a9e6d0d9312c60f.tar.gz
liburing-c9e76e8376bdf5acb0e3df0a7a9e6d0d9312c60f.tar.bz2
test/file-register: skip file skipping on older kernels
All new op testing should include this, so that tests continue to work on older kernels... Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--test/file-register.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/file-register.c b/test/file-register.c
index 0f4d679..b86ee59 100644
--- a/test/file-register.c
+++ b/test/file-register.c
@@ -565,6 +565,10 @@ static int test_skip(struct io_uring *ring)
files[90] = IORING_REGISTER_FILES_SKIP;
ret = io_uring_register_files_update(ring, 90, &files[90], 1);
if (ret != 1) {
+ if (ret == -EBADF) {
+ fprintf(stdout, "Skipping files not supported\n");
+ goto done;
+ }
fprintf(stderr, "%s: update ret=%d\n", __FUNCTION__, ret);
goto err;
}
@@ -579,6 +583,7 @@ static int test_skip(struct io_uring *ring)
goto err;
}
+done:
close_files(files, 100, 0);
return 0;
err: