selftests: net: More graceful finding of `ip'.
authorDaniel Díaz <daniel.diaz@linaro.org>
Fri, 7 Jul 2017 15:27:06 +0000 (10:27 -0500)
committerShuah Khan <shuahkh@osg.samsung.com>
Mon, 18 Sep 2017 16:46:48 +0000 (10:46 -0600)
The ip tool might be provided by another package (such as
Busybox), not necessarily implementing the -Version switch.
Trying an actual usage (`ip link show') might be a better
test that would work with all implementations of `ip'.

Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
tools/testing/selftests/net/netdevice.sh

index 4e00568..90cb903 100755 (executable)
@@ -178,7 +178,7 @@ if [ "$(id -u)" -ne 0 ];then
        exit 0
 fi
 
-ip -Version 2>/dev/null >/dev/null
+ip link show 2>/dev/null >/dev/null
 if [ $? -ne 0 ];then
        echo "SKIP: Could not run test without the ip tool"
        exit 0