kselftest: rtnetlink.sh: add verbose flag
authorDaniel Mendes <dmendes@redhat.com>
Tue, 12 Sep 2023 14:28:35 +0000 (10:28 -0400)
committerDavid S. Miller <davem@davemloft.net>
Mon, 18 Sep 2023 08:34:06 +0000 (09:34 +0100)
commit9c2a19f71515553a874e2bf31655ac2264a66e37
tree206b50a5b9e0340808ee3cbd52531058420204e0
parent760554a9add861a0a2d6ac4a85624f8b9537f1bf
kselftest: rtnetlink.sh: add verbose flag

Uses a run_cmd helper function similar to other selftests to add
verbose functionality i.e. print executed commands and their outputs

Many commands silence or redirect output. This can be removed since
the verbose helper function captures output anyway and only outputs it
if VERBOSE is true. Similarly, the helper command for pipes to grep
searches stderr and stdout. This makes output redirection unnecessary
in those cases.

Signed-off-by: Daniel Mendes <dmendes@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/rtnetlink.sh