summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2022-03-29 16:28:47 -0600
committerJens Axboe <axboe@kernel.dk>2022-03-29 16:28:47 -0600
commitcd63b85f857d87a3e4699b6ee5cc43b5dfb8682e (patch)
tree26e941f8f6c8c01c1cacd1ad01f3958a518b5983
parentbc35807c2fc8b900930c6bfe3b77e49fb2b051f0 (diff)
downloadliburing-cd63b85f857d87a3e4699b6ee5cc43b5dfb8682e.tar.gz
liburing-cd63b85f857d87a3e4699b6ee5cc43b5dfb8682e.tar.bz2
test/open-direct-link: don't test if CQE_SKIP isn't available
This just limits us to a newer kernel, and we use SKIP in testing it anyway. Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--test/open-direct-link.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/open-direct-link.c b/test/open-direct-link.c
index 44f7297..98a9cc0 100644
--- a/test/open-direct-link.c
+++ b/test/open-direct-link.c
@@ -115,16 +115,19 @@ err:
int main(int argc, char *argv[])
{
struct io_uring ring;
+ struct io_uring_params p = { };
int ret, files[MAX_FILES];
if (argc > 1)
return 0;
- ret = io_uring_queue_init(8, &ring, 0);
+ ret = io_uring_queue_init_params(8, &ring, &p);
if (ret) {
fprintf(stderr, "ring setup failed: %d\n", ret);
return 1;
}
+ if (!(p.features & IORING_FEAT_CQE_SKIP))
+ return 0;
memset(files, -1, sizeof(files));
ret = io_uring_register_files(&ring, files, ARRAY_SIZE(files));