public inbox for [email protected]
 help / color / mirror / Atom feed
* [PATCH liburing 1/1] tests: fix zc support checks
@ 2022-10-16 22:07 Pavel Begunkov
  2022-10-16 23:28 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Pavel Begunkov @ 2022-10-16 22:07 UTC (permalink / raw)
  To: io-uring; +Cc: Jens Axboe, asml.silence

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(-)

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH liburing 1/1] tests: fix zc support checks
  2022-10-16 22:07 [PATCH liburing 1/1] tests: fix zc support checks Pavel Begunkov
@ 2022-10-16 23:28 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2022-10-16 23:28 UTC (permalink / raw)
  To: Pavel Begunkov, io-uring

On Sun, 16 Oct 2022 23:07:35 +0100, Pavel Begunkov wrote:
> 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.
> 
> 

Applied, thanks!

[1/1] tests: fix zc support checks
      commit: 4f962862daa7d54de4d21eeaf89130ad49040fa7

Best regards,
-- 
Jens Axboe



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-10-16 23:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-16 22:07 [PATCH liburing 1/1] tests: fix zc support checks Pavel Begunkov
2022-10-16 23:28 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox