summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2021-11-27 07:01:33 -0700
committerJens Axboe <axboe@kernel.dk>2021-11-27 07:01:33 -0700
commit3cbc199a80f37ad5183e04144b4126bb9c619b8b (patch)
tree5e74060bcd09b11a6e4bc5441fb6e0307958e2c0
parent00b7628d9908d12ffe8a0547687055563a2a77e2 (diff)
downloadliburing-3cbc199a80f37ad5183e04144b4126bb9c619b8b.tar.gz
liburing-3cbc199a80f37ad5183e04144b4126bb9c619b8b.tar.bz2
test/skip-cqe: use correct index for write side of pipe
clang correctly complains about using out-of-array: skip-cqe.c:19:27: error: array index 2 is past the end of the array (which contains 2 elements) [-Werror,-Warray-bounds] io_uring_prep_write(sqe, fds[2], NULL, 100, 0); ^ ~ Fixes: 78f733007fd0 ("tests: add tests for IOSQE_CQE_SKIP_SUCCESS") Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--test/skip-cqe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/skip-cqe.c b/test/skip-cqe.c
index 9de5bae..ba84d92 100644
--- a/test/skip-cqe.c
+++ b/test/skip-cqe.c
@@ -16,7 +16,7 @@ static int fds[2];
/* should be successfully submitted but fails during execution */
static void prep_exec_fail_req(struct io_uring_sqe *sqe)
{
- io_uring_prep_write(sqe, fds[2], NULL, 100, 0);
+ io_uring_prep_write(sqe, fds[1], NULL, 100, 0);
}
static int test_link_success(struct io_uring *ring, int nr, bool skip_last)