We should be checking cqe->res for -EINVAL to figure out whether we support zerocopy or not. It makes the test fail with older kernels. Signed-off-by: Pavel Begunkov <asml.silence@xxxxxxxxx> --- test/send-zerocopy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/send-zerocopy.c b/test/send-zerocopy.c index 31d66e3..c6279bc 100644 --- a/test/send-zerocopy.c +++ b/test/send-zerocopy.c @@ -91,7 +91,7 @@ static int test_basic_send(struct io_uring *ring, int sock_tx, int sock_rx) ret = io_uring_wait_cqe(ring, &cqe); assert(!ret); assert(cqe->user_data == 1); - if (ret == -EINVAL) { + if (cqe->res == -EINVAL) { assert(!(cqe->flags & IORING_CQE_F_MORE)); return T_EXIT_SKIP; } -- 2.38.0