diff options
author | Jiri Pirko <jiri@mellanox.com> | 2018-07-23 09:24:05 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-07-23 20:44:13 -0700 |
commit | 7f333cbf2b5bb48045e4f31de1c33fb701ffa45a (patch) | |
tree | 51e8461c7ff2e5a3f72bfed7c51c8f71c16ffdf0 /tools | |
parent | e2f2a1fd5b2ceadc1182fb20809664076d75beb2 (diff) | |
download | linux-7f333cbf2b5bb48045e4f31de1c33fb701ffa45a.tar.bz2 |
selftests: forwarding: move shblock tc support check to a separate helper
The shared block support is only needed for tc_shblock.sh. No need to
require that for other test.
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/testing/selftests/net/forwarding/lib.sh | 3 | ||||
-rwxr-xr-x | tools/testing/selftests/net/forwarding/tc_shblocks.sh | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh index 2bb9cf303c53..ec94395a54a7 100644 --- a/tools/testing/selftests/net/forwarding/lib.sh +++ b/tools/testing/selftests/net/forwarding/lib.sh @@ -33,7 +33,10 @@ check_tc_version() echo "SKIP: iproute2 too old; tc is missing JSON support" exit 1 fi +} +check_tc_shblock_support() +{ tc filter help 2>&1 | grep block &> /dev/null if [[ $? -ne 0 ]]; then echo "SKIP: iproute2 too old; tc is missing shared block support" diff --git a/tools/testing/selftests/net/forwarding/tc_shblocks.sh b/tools/testing/selftests/net/forwarding/tc_shblocks.sh index b5b917203815..9826a446e2c0 100755 --- a/tools/testing/selftests/net/forwarding/tc_shblocks.sh +++ b/tools/testing/selftests/net/forwarding/tc_shblocks.sh @@ -105,6 +105,8 @@ cleanup() ip link set $swp2 address $swp2origmac } +check_tc_shblock_support + trap cleanup EXIT setup_prepare |