selftests: net: forwarding: change devlink resource support checking

As for the others, check help message output to find out if devlink
supports "resource" object.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Jiri Pirko 2019-01-28 12:02:12 +00:00 committed by David S. Miller
parent 39c6b53cc0
commit 6f64bcb62f

View File

@ -32,7 +32,7 @@ DEVLINK_VIDDID=$(lspci -s $(echo $DEVLINK_DEV | cut -d"/" -f2) \
############################################################################## ##############################################################################
# Sanity checks # Sanity checks
devlink -j resource show "$DEVLINK_DEV" &> /dev/null devlink help 2>&1 | grep resource &> /dev/null
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "SKIP: iproute2 too old, missing devlink resource support" echo "SKIP: iproute2 too old, missing devlink resource support"
exit 1 exit 1