[1/1] selftest: check tunnel type more accurately

Message ID CAP4sYWUcLeuGv=N2Ww8KvvyvG=2un8OH=zkn5n+kwrhkK+RRfA@mail.gmail.com
State Accepted
Delegated to: BPF Maintainers
Headers show
Series
  • [1/1] selftest: check tunnel type more accurately
Related show

Commit Message

Wang Jian June 13, 2018, 12:03 p.m.
Grep tunnel type directly to make sure 'ip' command supports it.

Signed-off-by: Jian Wang <jianjian.wang1@gmail.com>
---
 tools/testing/selftests/bpf/test_tunnel.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Y Song June 13, 2018, 4:53 p.m. | #1
On Wed, Jun 13, 2018 at 5:03 AM, Wang Jian <jianjian.wang1@gmail.com> wrote:
> 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>
Daniel Borkmann June 15, 2018, 1:25 a.m. | #2
On 06/13/2018 06:53 PM, Y Song wrote:
> On Wed, Jun 13, 2018 at 5:03 AM, Wang Jian <jianjian.wang1@gmail.com> wrote:
>> 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>

Applied to bpf, thanks Jian!

Patch

diff --git a/tools/testing/selftests/bpf/test_tunnel.sh
b/tools/testing/selftests/bpf/test_tunnel.sh
index aeb2901..c4b5fbb 100755
--- a/tools/testing/selftests/bpf/test_tunnel.sh
+++ b/tools/testing/selftests/bpf/test_tunnel.sh
@@ -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