diff options
author | Ido Schimmel <idosch@mellanox.com> | 2018-05-03 10:51:33 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-05-03 12:54:31 -0400 |
commit | 0eb8053c147b012dcb6c2c1deeb4d069a5b35fd9 (patch) | |
tree | d0681897df81599850bbacafefec16b44121bdd8 /tools/testing/selftests/net/forwarding/mirror_gre_neigh.sh | |
parent | 9413248753c4c5eba5a9e2548e7d98c73230763d (diff) |
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_neigh.sh')
-rwxr-xr-x | tools/testing/selftests/net/forwarding/mirror_gre_neigh.sh | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/tools/testing/selftests/net/forwarding/mirror_gre_neigh.sh b/tools/testing/selftests/net/forwarding/mirror_gre_neigh.sh index 1ca29ba4f338..fc0508e40fca 100755 --- a/tools/testing/selftests/net/forwarding/mirror_gre_neigh.sh +++ b/tools/testing/selftests/net/forwarding/mirror_gre_neigh.sh @@ -9,6 +9,11 @@ # is set up. Later on, the neighbor is deleted and it is expected to be # reinitialized using the usual ARP process, and the mirroring offload updated. +ALL_TESTS=" + test_gretap + test_ip6gretap +" + NUM_NETIFS=6 source lib.sh source mirror_lib.sh @@ -69,15 +74,24 @@ test_span_gre_neigh() log_test "$direction $what: neighbor change ($tcflags)" } -test_all() +test_gretap() { - slow_path_trap_install $swp1 ingress - slow_path_trap_install $swp1 egress - test_span_gre_neigh 192.0.2.130 gt4 ingress "mirror to gretap" test_span_gre_neigh 192.0.2.130 gt4 egress "mirror to gretap" +} + +test_ip6gretap() +{ test_span_gre_neigh 2001:db8:2::2 gt6 ingress "mirror to ip6gretap" test_span_gre_neigh 2001:db8:2::2 gt6 egress "mirror to ip6gretap" +} + +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 |