]> www.infradead.org Git - users/dwmw2/linux.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Dec 2019 21:31:04 +0000 (22:31 +0100)
commitcb2008b4de93c5319faf55ad248180bb402496ec
treee115855e769005b8981b955a8ce6f43c1dfd6c99
parentb5c36e7734b8b288bf851ddc159d8efeded1edc1
selftests: pmtu: use -oneline for ip route list cache

[ Upstream commit 2745aea6750ff0d2c48285d25bdb00e5b636ec8b ]

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: b964641e9925 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/testing/selftests/net/pmtu.sh