]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
selftests: net: forwarding: change devlink resource support checking
authorJiri Pirko <jiri@mellanox.com>
Mon, 28 Jan 2019 12:02:12 +0000 (12:02 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2019 18:43:15 +0000 (10:43 -0800)
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>
tools/testing/selftests/net/forwarding/devlink_lib.sh

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