public inbox for [email protected]
 help / color / mirror / Atom feed
From: Pavel Begunkov <[email protected]>
To: [email protected]
Cc: Jens Axboe <[email protected]>, [email protected]
Subject: [PATCH liburing 3/3] tests/zc: extra verification for notif completions
Date: Fri,  4 Nov 2022 11:05:53 +0000	[thread overview]
Message-ID: <a3149c7ca700ddb93ceceb2a32bdde1dd51d4d19.1667559818.git.asml.silence@gmail.com> (raw)
In-Reply-To: <[email protected]>

Signed-off-by: Pavel Begunkov <[email protected]>
---
 test/send-zerocopy.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/test/send-zerocopy.c b/test/send-zerocopy.c
index 6e637f4..16830df 100644
--- a/test/send-zerocopy.c
+++ b/test/send-zerocopy.c
@@ -172,6 +172,12 @@ static int test_send_faults(int sock_tx, int sock_rx)
 			}
 			if (cqe->flags & IORING_CQE_F_MORE)
 				nr_cqes++;
+		} else {
+			if (cqe->res != 0 || cqe->flags != IORING_CQE_F_NOTIF) {
+				fprintf(stderr, "invalid notif cqe %i %i\n",
+					cqe->res, cqe->flags);
+				return -1;
+			}
 		}
 		io_uring_cqe_seen(&ring, cqe);
 	}
-- 
2.38.0


  parent reply	other threads:[~2022-11-04 11:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-04 11:05 [PATCH liburing 0/3] some extra zc tests Pavel Begunkov
2022-11-04 11:05 ` [PATCH liburing 1/3] tests/zc: create a new ring for test_send_faults() Pavel Begunkov
2022-11-04 11:05 ` [PATCH liburing 2/3] tests/zc: add control flags tests Pavel Begunkov
2022-11-04 11:05 ` Pavel Begunkov [this message]
2022-11-05 15:20 ` [PATCH liburing 0/3] some extra zc tests 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=a3149c7ca700ddb93ceceb2a32bdde1dd51d4d19.1667559818.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