diff options
author | Jens Axboe <axboe@kernel.dk> | 2020-04-30 10:21:03 -0600 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-04-30 10:21:03 -0600 |
commit | 9f43ad38c5dc64b333e0718f7b613aa2803f7cc6 (patch) | |
tree | 1e61d2d95bd9003f9c5d63ba2e8e68182633f783 | |
parent | bbf591c6c2d7d1dc9287db0728e3e821ba9b7666 (diff) | |
download | liburing-9f43ad38c5dc64b333e0718f7b613aa2803f7cc6.tar.gz liburing-9f43ad38c5dc64b333e0718f7b613aa2803f7cc6.tar.bz2 |
test/link-timeout: FASTPOLL kernels can cancel successfully
We expect -EALREADY since an async worker was previously holding this
request, but for kernels with FASTPOLL (5.7+), we can successfully
cancel from the timeout. Allow -ETIME as well for the return value of
the linked timeout.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r-- | test/link-timeout.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/link-timeout.c b/test/link-timeout.c index 4095f0a..153acb4 100644 --- a/test/link-timeout.c +++ b/test/link-timeout.c @@ -598,7 +598,8 @@ static int test_timeout_link_chain1(struct io_uring *ring) } break; case 2: - if (cqe->res != -EALREADY) { + /* FASTPOLL kernels can cancel successfully */ + if (cqe->res != -EALREADY && cqe->res != -ETIME) { fprintf(stderr, "Req %llu got %d\n", cqe->user_data, cqe->res); goto err; |