提交 231b85ab 编写于 作者: I Ido Schimmel 提交者: David S. Miller

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: NIdo Schimmel <idosch@mellanox.com>
Reviewed-by: NJiri Pirko <jiri@mellanox.com>
Reviewed-by: NDavid Ahern <dsahern@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 ff0162af
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册