]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: pmtu: use -oneline for ip route list cache
authorThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Thu, 28 Nov 2019 18:58:06 +0000 (15:58 -0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 29 Nov 2019 20:29:55 +0000 (12:29 -0800)
commit1c3c710f3eb677d973b2c8dcbda0ee8460d07062
tree6f11321dc0fa44bdf2a7bde137b89c4c6ff3ad4c
parent5789cd30b3ea325d96d5bd5629858379495c1d87
selftests: pmtu: use -oneline for ip route list cache

Some versions of iproute2 will output more than one line per entry, which
will cause the test to fail, like:

TEST: ipv6: list and flush cached exceptions                        [FAIL]
  can't list cached exceptions

That happens, for example, with iproute2 4.15.0. When using the -oneline
option, this will work just fine:

TEST: ipv6: list and flush cached exceptions                        [ OK ]

This also works just fine with a more recent version of iproute2, like
5.4.0.

For some reason, two lines are printed for the IPv4 test no matter what
version of iproute2 is used. Use the same -oneline parameter there instead
of counting the lines twice.

Fixes: a626f5cc012f ("selftests: pmtu: Make list_flush_ipv6_exception test more demanding")
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Acked-by: Stefano Brivio <sbrivio@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/pmtu.sh