summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorIdo Schimmel <idosch@mellanox.com>2018-03-11 09:57:24 +0200
committerDavid S. Miller <davem@davemloft.net>2018-03-11 22:44:24 -0400
commit231b85abaaeef119811a9f036245c94bd5483415 (patch)
treed0932a1eef5845e25712b75d6fd6985d6ca2aa6a /tools
parentff0162af9e7b2e33d4d40f41130c65ba416ba059 (diff)
downloadlinux-0-day-231b85abaaeef119811a9f036245c94bd5483415.tar.gz
linux-0-day-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.sh4
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 6ac8a98fa2709..e989d8a1d4fb5 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