diff options
author | Ido Schimmel <idosch@mellanox.com> | 2018-03-11 10:57:24 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-03-12 05:44:24 +0300 |
commit | 231b85abaaeef119811a9f036245c94bd5483415 (patch) | |
tree | d0932a1eef5845e25712b75d6fd6985d6ca2aa6a /tools | |
parent | ff0162af9e7b2e33d4d40f41130c65ba416ba059 (diff) | |
download | linux-231b85abaaeef119811a9f036245c94bd5483415.tar.xz |
selftests: forwarding: Exit with error when missing interfaces
Returning 0 gives a false sense of success when the required modules did
not even manage to be initialized and register the required net devices.
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Reviewed-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/testing/selftests/net/forwarding/lib.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh index 6ac8a98fa270..e989d8a1d4fb 100644 --- a/tools/testing/selftests/net/forwarding/lib.sh +++ b/tools/testing/selftests/net/forwarding/lib.sh @@ -55,7 +55,7 @@ fi if [[ ! -v NUM_NETIFS ]]; then echo "SKIP: importer does not define \"NUM_NETIFS\"" - exit 0 + exit 1 fi ############################################################################## @@ -115,7 +115,7 @@ for i in $(eval echo {1..$NUM_NETIFS}); do ip link show dev ${NETIFS[p$i]} &> /dev/null if [[ $? -ne 0 ]]; then echo "SKIP: could not find all required interfaces" - exit 0 + exit 1 fi done |