]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
bpf, selftest: check tunnel type more accurately
authorJian Wang <jianjian.wang1@gmail.com>
Fri, 15 Jun 2018 01:22:17 +0000 (03:22 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 15 Jun 2018 01:23:01 +0000 (03:23 +0200)
Grep tunnel type directly to make sure 'ip' command supports it.

Signed-off-by: Jian Wang <jianjian.wang1@gmail.com>
Acked-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/testing/selftests/bpf/test_tunnel.sh

index aeb2901f21f4737558efbecec73974b17c610a38..c4b5fbbaa76035073e4cd5c3b7ac8993434db5b8 100755 (executable)
@@ -668,7 +668,7 @@ cleanup_exit()
 
 check()
 {
-       ip link help $1 2>&1 | grep -q "^Usage:"
+       ip link help 2>&1 | grep -q "\s$1\s"
        if [ $? -ne 0 ];then
                echo "SKIP $1: iproute2 not support"
        cleanup