summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWillem de Bruijn <willemb@google.com>2017-09-01 19:31:51 +0300
committerDavid S. Miller <davem@davemloft.net>2017-09-01 20:41:21 +0300
commitbbd9644e84f68587ed136c7e1c56e454c26231ff (patch)
tree3692a32ffd01ee1a749b508cb08ad41a1e6d3777
parentcc8889ae8298ebfc6bbf52ad98fe3b5afdf4ae70 (diff)
downloadlinux-bbd9644e84f68587ed136c7e1c56e454c26231ff.tar.xz
selftests: correct define in msg_zerocopy.c
The msg_zerocopy test defines SO_ZEROCOPY if necessary, but its value is inconsistent with the one in asm-generic.h. Correct that. Also convert one error to a warning. When the test is complete, report throughput and close cleanly even if the process did not wait for all completions. Reported-by: Dan Melnic <dmm@fb.com> Signed-off-by: Willem de Bruijn <willemb@google.com> Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--tools/testing/selftests/net/msg_zerocopy.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/testing/selftests/net/msg_zerocopy.c b/tools/testing/selftests/net/msg_zerocopy.c
index 448c69a8af74..40232af5b023 100644
--- a/tools/testing/selftests/net/msg_zerocopy.c
+++ b/tools/testing/selftests/net/msg_zerocopy.c
@@ -59,7 +59,7 @@
#endif
#ifndef SO_ZEROCOPY
-#define SO_ZEROCOPY 59
+#define SO_ZEROCOPY 60
#endif
#ifndef SO_EE_CODE_ZEROCOPY_COPIED
@@ -382,8 +382,8 @@ static void do_recv_remaining_completions(int fd)
}
if (completions < expected_completions)
- error(1, 0, "missing notifications: %lu < %lu\n",
- completions, expected_completions);
+ fprintf(stderr, "missing notifications: %lu < %lu\n",
+ completions, expected_completions);
}
static void do_tx(int domain, int type, int protocol)