]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: fib_tests: Fix 'Command line is not complete' errors
authorDavid Ahern <dsahern@gmail.com>
Tue, 9 Apr 2019 21:23:10 +0000 (14:23 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 11 Apr 2019 21:17:59 +0000 (14:17 -0700)
commitb7c2df70f65033864bd63b5ea1ed785a21f58005
treefdfb94880859dc7af51dda31335841e7a6620956
parent2b3c21cd798c5ada8e7794b36a84e7d4948b67c7
selftests: fib_tests: Fix 'Command line is not complete' errors

A couple of tests are verifying a route has been removed. The helper
expects the prefix as the first part of the expected output. When
checking that a route has been deleted the prefix is empty leading
to an invalid ip command:

  $ ip ro ls match
  Command line is not complete. Try option "help"

Fix by moving the comparison of expected output and output to a new
function that is used by both check_route and check_route6. Use the
new helper for the 2 checks on route removal.

Also, remove the reset of 'set -x' in route_setup which overrides the
user managed setting.

Fixes: 077d3d8e2c32d ("selftests: fib_tests: Add prefix route tests with metric")
Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/fib_tests.sh