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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Pavel Begunkov <asml.silence@xxxxxxxxx>
---
 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




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux