tests: fix zc support checks
PATCH 1/1 tests: fix zc support checks
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 <[email protected]>
--- test/send-zerocopy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
test/send-zerocopy.c +1 -1
@@ -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 ; }
Signature · 1 line
2.38.0
Quoted 4 lines · Pavel Begunkov
We should be checking
cqe->resfor-EINVALto figure out whether we support zerocopy or not. It makes the test fail with older kernels.
Applied, thanks!
[1/1] tests: fix zc support checks
commit: 4f962862daa7d54de4d21eeaf89130ad49040fa7
Best regards,
Signature · 1 line
Jens Axboe