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/bridge_vlan_aware.sh | |
parent | 9413248753c4c5eba5a9e2548e7d98c73230763d (diff) | |
download | linux-0eb8053c147b012dcb6c2c1deeb4d069a5b35fd9.tar.bz2 |
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/bridge_vlan_aware.sh')
-rwxr-xr-x | tools/testing/selftests/net/forwarding/bridge_vlan_aware.sh | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/tools/testing/selftests/net/forwarding/bridge_vlan_aware.sh b/tools/testing/selftests/net/forwarding/bridge_vlan_aware.sh index 75d922438bc9..d8313d0438b7 100755 --- a/tools/testing/selftests/net/forwarding/bridge_vlan_aware.sh +++ b/tools/testing/selftests/net/forwarding/bridge_vlan_aware.sh @@ -1,6 +1,7 @@ #!/bin/bash # SPDX-License-Identifier: GPL-2.0 +ALL_TESTS="ping_ipv4 ping_ipv6 learning flooding" NUM_NETIFS=4 CHECK_TC="yes" source lib.sh @@ -75,14 +76,31 @@ cleanup() vrf_cleanup } +ping_ipv4() +{ + ping_test $h1 192.0.2.2 +} + +ping_ipv6() +{ + ping6_test $h1 2001:db8:1::2 +} + +learning() +{ + learning_test "br0" $swp1 $h1 $h2 +} + +flooding() +{ + flood_test $swp2 $h1 $h2 +} + trap cleanup EXIT setup_prepare setup_wait -ping_test $h1 192.0.2.2 -ping6_test $h1 2001:db8:1::2 -learning_test "br0" $swp1 $h1 $h2 -flood_test $swp2 $h1 $h2 +tests_run exit $EXIT_STATUS |