diff options
author | Willem de Bruijn <willemb@google.com> | 2018-05-31 12:14:38 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-06-04 09:49:39 -0400 |
commit | 830669e691464c005ff7262b74797fb2222da99a (patch) | |
tree | f2a5f2af9c3c66705ee7aff7fcfef1ad7cc059c7 | |
parent | 2fa3c8a8b23041490b279d2630f1cfc9fae242fb (diff) |
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>
-rw-r--r-- | tools/testing/selftests/net/Makefile | 2 | ||||
-rwxr-xr-x | tools/testing/selftests/net/msg_zerocopy.sh | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/tools/testing/selftests/net/Makefile b/tools/testing/selftests/net/Makefile index 7cb0f49efdb7..f39100b970af 100644 --- a/tools/testing/selftests/net/Makefile +++ b/tools/testing/selftests/net/Makefile | |||
@@ -6,7 +6,7 @@ CFLAGS += -I../../../../usr/include/ | |||
6 | 6 | ||
7 | TEST_PROGS := run_netsocktests run_afpackettests test_bpf.sh netdevice.sh rtnetlink.sh | 7 | TEST_PROGS := run_netsocktests run_afpackettests test_bpf.sh netdevice.sh rtnetlink.sh |
8 | TEST_PROGS += fib_tests.sh fib-onlink-tests.sh pmtu.sh udpgso.sh | 8 | TEST_PROGS += fib_tests.sh fib-onlink-tests.sh pmtu.sh udpgso.sh |
9 | TEST_PROGS += udpgso_bench.sh fib_rule_tests.sh | 9 | TEST_PROGS += udpgso_bench.sh fib_rule_tests.sh msg_zerocopy.sh |
10 | TEST_PROGS_EXTENDED := in_netns.sh | 10 | TEST_PROGS_EXTENDED := in_netns.sh |
11 | TEST_GEN_FILES = socket | 11 | TEST_GEN_FILES = socket |
12 | TEST_GEN_FILES += psock_fanout psock_tpacket msg_zerocopy | 12 | TEST_GEN_FILES += psock_fanout psock_tpacket msg_zerocopy |
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' | |||
21 | 21 | ||
22 | readonly path_sysctl_mem="net.core.optmem_max" | 22 | readonly path_sysctl_mem="net.core.optmem_max" |
23 | 23 | ||
24 | # No arguments: automated test | ||
25 | if [[ "$#" -eq "0" ]]; then | ||
26 | $0 4 tcp -t 1 | ||
27 | $0 6 tcp -t 1 | ||
28 | echo "OK. All tests passed" | ||
29 | exit 0 | ||
30 | fi | ||
31 | |||
24 | # Argument parsing | 32 | # Argument parsing |
25 | if [[ "$#" -lt "2" ]]; then | 33 | if [[ "$#" -lt "2" ]]; then |
26 | echo "Usage: $0 [4|6] [tcp|udp|raw|raw_hdrincl|packet|packet_dgram] <args>" | 34 | echo "Usage: $0 [4|6] [tcp|udp|raw|raw_hdrincl|packet|packet_dgram] <args>" |