aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/net/forwarding/mirror_gre.sh
diff options
context:
space:
mode:
authorIdo Schimmel <idosch@mellanox.com>2018-05-03 10:51:33 +0300
committerDavid S. Miller <davem@davemloft.net>2018-05-03 12:54:31 -0400
commit0eb8053c147b012dcb6c2c1deeb4d069a5b35fd9 (patch)
treed0681897df81599850bbacafefec16b44121bdd8 /tools/testing/selftests/net/forwarding/mirror_gre.sh
parentselftests: forwarding: Increase maximum deviation in multipath test (diff)
downloadlinux-dev-0eb8053c147b012dcb6c2c1deeb4d069a5b35fd9.tar.xz
linux-dev-0eb8053c147b012dcb6c2c1deeb4d069a5b35fd9.zip
selftests: forwarding: Allow running specific tests
Similar to commit a511858c7536 ("selftests: fib_tests: Allow user to run a specific test"), allow user to run only a subset of the tests using the TESTS environment variable. This is useful when not all the tests can pass on a given system. Example: # export TESTS="ping_ipv4 ping_ipv6" # ./bridge_vlan_aware.sh TEST: ping [PASS] TEST: ping6 [PASS] Signed-off-by: Petr Machata <petrm@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Reviewed-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/testing/selftests/net/forwarding/mirror_gre.sh')
-rwxr-xr-xtools/testing/selftests/net/forwarding/mirror_gre.sh36
1 files changed, 29 insertions, 7 deletions
diff --git a/tools/testing/selftests/net/forwarding/mirror_gre.sh b/tools/testing/selftests/net/forwarding/mirror_gre.sh
index a8abc736f67c..c6786d1b2b96 100755
--- a/tools/testing/selftests/net/forwarding/mirror_gre.sh
+++ b/tools/testing/selftests/net/forwarding/mirror_gre.sh
@@ -10,6 +10,14 @@
# traffic. Test that the payload is what is expected (ICMP ping request or
# reply, depending on test).
+ALL_TESTS="
+ test_gretap
+ test_ip6gretap
+ test_gretap_mac
+ test_ip6gretap_mac
+ test_two_spans
+"
+
NUM_NETIFS=6
source lib.sh
source mirror_lib.sh
@@ -100,22 +108,36 @@ test_two_spans()
log_test "two simultaneously configured mirrors ($tcflags)"
}
-test_all()
+test_gretap()
{
- slow_path_trap_install $swp1 ingress
- slow_path_trap_install $swp1 egress
-
full_test_span_gre_dir gt4 ingress 8 0 "mirror to gretap"
- full_test_span_gre_dir gt6 ingress 8 0 "mirror to ip6gretap"
full_test_span_gre_dir gt4 egress 0 8 "mirror to gretap"
+}
+
+test_ip6gretap()
+{
+ full_test_span_gre_dir gt6 ingress 8 0 "mirror to ip6gretap"
full_test_span_gre_dir gt6 egress 0 8 "mirror to ip6gretap"
+}
+test_gretap_mac()
+{
test_span_gre_mac gt4 ingress ip "mirror to gretap"
- test_span_gre_mac gt6 ingress ipv6 "mirror to ip6gretap"
test_span_gre_mac gt4 egress ip "mirror to gretap"
+}
+
+test_ip6gretap_mac()
+{
+ test_span_gre_mac gt6 ingress ipv6 "mirror to ip6gretap"
test_span_gre_mac gt6 egress ipv6 "mirror to ip6gretap"
+}
- test_two_spans
+test_all()
+{
+ slow_path_trap_install $swp1 ingress
+ slow_path_trap_install $swp1 egress
+
+ tests_run
slow_path_trap_uninstall $swp1 egress
slow_path_trap_uninstall $swp1 ingress