From: Pavel Begunkov <[email protected]>
To: [email protected]
Cc: Jens Axboe <[email protected]>, [email protected]
Subject: [PATCH liburing 1/1] tests: fix zc support checks
Date: Sun, 16 Oct 2022 23:07:35 +0100 [thread overview]
Message-ID: <0c8bf4d5dd7135c990f4fa9232a54c8cd6cc024f.1665958020.git.asml.silence@gmail.com> (raw)
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
next reply other threads:[~2022-10-16 22:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-16 22:07 Pavel Begunkov [this message]
2022-10-16 23:28 ` [PATCH liburing 1/1] tests: fix zc support checks Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0c8bf4d5dd7135c990f4fa9232a54c8cd6cc024f.1665958020.git.asml.silence@gmail.com \
[email protected] \
[email protected] \
[email protected] \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox