summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2020-02-01 10:44:08 -0700
committerJens Axboe <axboe@kernel.dk>2020-02-01 10:44:08 -0700
commit75d088eaecaa9006fd9e38344a050e9fba5abe10 (patch)
treec4190699e18f9822f20525782ff46f7a671931f3
parentec4710a19dcec10f446264594a984628354ec804 (diff)
downloadliburing-75d088eaecaa9006fd9e38344a050e9fba5abe10.tar.gz
liburing-75d088eaecaa9006fd9e38344a050e9fba5abe10.tar.bz2
test/read-write: skip eventfd read if we know we don't have READ
Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--test/read-write.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/read-write.c b/test/read-write.c
index 3d207c5..e36dfbc 100644
--- a/test/read-write.c
+++ b/test/read-write.c
@@ -17,6 +17,7 @@
#define BUFFERS (FILE_SIZE / BS)
static struct iovec *vecs;
+static int no_read;
static int create_buffers(void)
{
@@ -182,6 +183,7 @@ static int test_io(const char *file, int write, int buffered, int sqthread,
fprintf(stdout, "Non-vectored IO not "
"supported, skipping\n");
warned = 1;
+ no_read = 1;
}
} else if (cqe->res != BS) {
fprintf(stderr, "cqe res %d, wanted %d\n", cqe->res, BS);
@@ -309,13 +311,16 @@ out:
return 1;
}
-static int test_eventfd_read() {
+static int test_eventfd_read(void)
+{
struct io_uring ring;
int fd, ret;
eventfd_t event;
struct io_uring_sqe *sqe;
struct io_uring_cqe *cqe;
+ if (no_read)
+ return 0;
ret = io_uring_queue_init(8, &ring, 0);
if (ret)
return ret;