selftests: Add debugging options to pmtu.sh
authorDavid Ahern <dsahern@gmail.com>
Thu, 11 Apr 2019 18:51:50 +0000 (11:51 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 12 Apr 2019 04:32:00 +0000 (21:32 -0700)
commit56490b623aa0ffa8526611e3e76a8ac546fe78f6
tree1cbe70a24737ae42e6b6d606d32df69fd35beab4
parentbb23581b9b38703257acabd520aa5ebf1db008af
selftests: Add debugging options to pmtu.sh

pmtu.sh script runs a number of tests and dumps a summary of pass/fail.
If a test fails, it is near impossible to debug why. For example:

    TEST: ipv6: PMTU exceptions                       [FAIL]

There are a lot of commands run behind the scenes for this test. Which
one is failing?

Add a VERBOSE option to show commands that are run and any output from
those commands. Add a PAUSE_ON_FAIL option to halt the script if a test
fails allowing users to poke around with the setup in the failed state.

In the process, rename tracing to TRACING and move declaration to top
with the new variables.

Signed-off-by: David Ahern <dsahern@gmail.com>
Reviewed-by: Stefano Brivio <sbrivio@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/pmtu.sh