diff options
author | Jens Axboe <axboe@kernel.dk> | 2020-05-29 11:35:33 -0600 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-05-29 11:35:33 -0600 |
commit | cb681c394dca54a88101e17168cb7881a05984ae (patch) | |
tree | ef56d047becdefa72c0ca61b92e80e9996f6eb1f /test | |
parent | db4d0388694403998cda03ace5f31fd8a2acd6fc (diff) | |
download | liburing-cb681c394dca54a88101e17168cb7881a05984ae.tar.gz liburing-cb681c394dca54a88101e17168cb7881a05984ae.tar.bz2 |
test/iopoll: skip test if file/device/fs doesn't supported polled IO
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'test')
-rw-r--r-- | test/iopoll.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/iopoll.c b/test/iopoll.c index 1ac5a7c..296dad2 100644 --- a/test/iopoll.c +++ b/test/iopoll.c @@ -20,6 +20,7 @@ static struct iovec *vecs; static int no_buf_select; +static int no_iopoll; static int create_buffers(void) { @@ -190,6 +191,10 @@ static int __test_io(const char *file, struct io_uring *ring, int write, int sqt if (ret) { fprintf(stderr, "wait_cqe=%d\n", ret); goto err; + } else if (cqe->res == -EOPNOTSUPP) { + fprintf(stdout, "File/device/fs doesn't support polled IO\n"); + no_iopoll = 1; + break; } else if (cqe->res != BS) { fprintf(stderr, "cqe res %d, wanted %d\n", cqe->res, BS); goto err; @@ -313,6 +318,8 @@ int main(int argc, char *argv[]) fprintf(stderr, "test_io failed %d/%d/%d/%d\n", v1, v2, v3, v4); goto err; } + if (no_iopoll) + break; } if (fname != argv[1]) |