From 2cc080f7e2f207d02bbbdfaa885064c12db84e43 Mon Sep 17 00:00:00 2001 From: Pavel Begunkov Date: Tue, 27 Sep 2022 16:28:59 +0100 Subject: [PATCH] tests: a small fix for zc tests Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/4794c23f60a3a0f4c5f6e83af4598eca47dda68a.1664292508.git.asml.silence@gmail.com Signed-off-by: Jens Axboe --- test/send-zerocopy.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/send-zerocopy.c b/test/send-zerocopy.c index 1c4e5f22..88578e0e 100644 --- a/test/send-zerocopy.c +++ b/test/send-zerocopy.c @@ -141,9 +141,7 @@ static int test_send_faults(struct io_uring *ring, int sock_tx, int sock_rx) assert(!ret); assert(cqe->user_data <= 2); - if (cqe->flags & IORING_CQE_F_NOTIF) { - assert(ret > 0); - } else { + if (!(cqe->flags & IORING_CQE_F_NOTIF)) { assert(cqe->res == -EFAULT); if (cqe->flags & IORING_CQE_F_MORE) nr_cqes++;