OSDN Git Service

selftests: forwarding: Only check tc version for tc tests
authorDavid Ahern <dsahern@gmail.com>
Thu, 1 Mar 2018 21:49:30 +0000 (13:49 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 2 Mar 2018 02:19:02 +0000 (21:19 -0500)
commit198979be6c16aa62025d5a47680f2c7849b7e64c
treeac773524647c2cbd5c5c8fbb0b1d827308c35063
parent5f6f845b608a3fa13e5da0584eea5803710cf708
selftests: forwarding: Only check tc version for tc tests

Capabilities of tc command are irrelevant for router tests:
    $ ./router.sh
    SKIP: iproute2 too old, missing shared block support

Add a CHECK_TC flag and only check tc capabilities if set. Add flag to
tc_common.sh and have it sourced before lib.sh

Also, if the command lacks some feature the test should exit non-0.

Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/forwarding/bridge_vlan_aware.sh
tools/testing/selftests/net/forwarding/lib.sh
tools/testing/selftests/net/forwarding/tc_actions.sh
tools/testing/selftests/net/forwarding/tc_chains.sh
tools/testing/selftests/net/forwarding/tc_common.sh
tools/testing/selftests/net/forwarding/tc_flower.sh
tools/testing/selftests/net/forwarding/tc_shblocks.sh