aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/net/msg_zerocopy.sh
diff options
context:
space:
mode:
authorWillem de Bruijn <willemb@google.com>2018-05-31 12:14:38 -0400
committerDavid S. Miller <davem@davemloft.net>2018-06-04 09:49:39 -0400
commit830669e691464c005ff7262b74797fb2222da99a (patch)
treef2a5f2af9c3c66705ee7aff7fcfef1ad7cc059c7 /tools/testing/selftests/net/msg_zerocopy.sh
parentnet: virtio: simplify the virtnet_find_vqs (diff)
downloadlinux-dev-830669e691464c005ff7262b74797fb2222da99a.tar.xz
linux-dev-830669e691464c005ff7262b74797fb2222da99a.zip
selftests/net: enable msg_zerocopy test
The existing msg_zerocopy test takes additional protocol arguments. Add a variant that takes no arguments and runs all supported variants. Call this from kselftest. Signed-off-by: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rwxr-xr-xtools/testing/selftests/net/msg_zerocopy.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/testing/selftests/net/msg_zerocopy.sh b/tools/testing/selftests/net/msg_zerocopy.sh
index d571d213418d..c43c6debda06 100755
--- a/tools/testing/selftests/net/msg_zerocopy.sh
+++ b/tools/testing/selftests/net/msg_zerocopy.sh
@@ -21,6 +21,14 @@ readonly DADDR6='fd::2'
readonly path_sysctl_mem="net.core.optmem_max"
+# No arguments: automated test
+if [[ "$#" -eq "0" ]]; then
+ $0 4 tcp -t 1
+ $0 6 tcp -t 1
+ echo "OK. All tests passed"
+ exit 0
+fi
+
# Argument parsing
if [[ "$#" -lt "2" ]]; then
echo "Usage: $0 [4|6] [tcp|udp|raw|raw_hdrincl|packet|packet_dgram] <args>"