selftests: make order checking verbose in msg_zerocopy selftest
authorZijian Zhang <zijianzhang@bytedance.com>
Mon, 1 Jul 2024 22:53:49 +0000 (22:53 +0000)
committerJakub Kicinski <kuba@kernel.org>
Thu, 4 Jul 2024 02:42:32 +0000 (19:42 -0700)
We find that when lock debugging is on, notifications may not come in
order. Thus, we have order checking outputs managed by cfg_verbose, to
avoid too many outputs in this case.

Fixes: 07b65c5b31ce ("test: add msg_zerocopy test")
Signed-off-by: Zijian Zhang <zijianzhang@bytedance.com>
Signed-off-by: Xiaochun Lu <xiaochun.lu@bytedance.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Link: https://patch.msgid.link/20240701225349.3395580-3-zijianzhang@bytedance.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/msg_zerocopy.c

index 926556febc83ce38ef0b3c3bb296ad22e04db142..7ea5fb28c93db27d250a03a518c491b03ae6b628 100644 (file)
@@ -438,7 +438,7 @@ static bool do_recv_completion(int fd, int domain)
        /* Detect notification gaps. These should not happen often, if at all.
         * Gaps can occur due to drops, reordering and retransmissions.
         */
-       if (lo != next_completion)
+       if (cfg_verbose && lo != next_completion)
                fprintf(stderr, "gap: %u..%u does not append to %u\n",
                        lo, hi, next_completion);
        next_completion = hi + 1;