diff mbox series

[liburing,3/3] tests/zc: extra verification for notif completions

Message ID a3149c7ca700ddb93ceceb2a32bdde1dd51d4d19.1667559818.git.asml.silence@gmail.com (mailing list archive)
State New
Headers show
Series some extra zc tests | expand

Commit Message

Pavel Begunkov Nov. 4, 2022, 11:05 a.m. UTC
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
---
 test/send-zerocopy.c | 6 ++++++
 1 file changed, 6 insertions(+)
diff mbox series

Patch

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);
 	}