Re: [PATCH v2] selftests: net: More graceful finding of `ip'.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/07/2017 09:27 AM, Daniel Díaz wrote:
> 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@xxxxxxxxxx>

Applied to linux-kselftest fixes for 4.14-rc2

thanks,
-- Shuah

> ---
> v1: Use `type ip' for the check.
> v2: Try just running the command.
> 
>  tools/testing/selftests/net/netdevice.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/net/netdevice.sh b/tools/testing/selftests/net/netdevice.sh
> index 4e00568..90cb903 100755
> --- a/tools/testing/selftests/net/netdevice.sh
> +++ b/tools/testing/selftests/net/netdevice.sh
> @@ -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
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux