summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2020-03-23 08:58:55 -0600
committerJens Axboe <axboe@kernel.dk>2020-03-23 08:58:55 -0600
commitf3c1c9499da3cb8300b36a88f8464b6bbb255095 (patch)
tree86ae9605522a803cb8e3854009808cf4b9f33d52 /test
parent1dbb1a3f0630cd90d4494e79f670800c3e2dfb8d (diff)
downloadliburing-f3c1c9499da3cb8300b36a88f8464b6bbb255095.tar.gz
liburing-f3c1c9499da3cb8300b36a88f8464b6bbb255095.tar.bz2
test/read-write: skip IOSQE_ASYNC if not supported
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'test')
-rw-r--r--test/read-write.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/read-write.c b/test/read-write.c
index 2120be9..9450a8c 100644
--- a/test/read-write.c
+++ b/test/read-write.c
@@ -549,6 +549,11 @@ static int test_io_link(const char *file)
ret = io_uring_submit(&ring);
if (ret != nr_sqes) {
+ ret = io_uring_peek_cqe(&ring, &cqe);
+ if (!ret && cqe->res == -EINVAL) {
+ fprintf(stdout, "IOSQE_ASYNC not supported, skipped\n");
+ goto out;
+ }
fprintf(stderr, "submit got %d, wanted %d\n", ret, nr_sqes);
goto err;
}
@@ -573,6 +578,7 @@ static int test_io_link(const char *file)
io_uring_cqe_seen(&ring, cqe);
}
+out:
io_uring_queue_exit(&ring);
close(fd);
return 0;