selftests: mptcp: join: fix ShellCheck warnings
authorMatthieu Baerts <matthieu.baerts@tessares.net>
Fri, 14 Apr 2023 15:47:10 +0000 (17:47 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 17 Apr 2023 07:25:33 +0000 (08:25 +0100)
commit0fcd72df8847d3a62eb34a084862157ce0564a94
treec5cc0e4053f6cbb0f3b0fc1d497ca1b66f282f53
parent0a85264e48b642d360720589fdb837a3643fb9b0
selftests: mptcp: join: fix ShellCheck warnings

Most of the code had an issue according to ShellCheck.

That's mainly due to the fact it incorrectly believes most of the code
was unreachable because it's invoked by variable name, see how the
"tests" array is used.

Once SC2317 has been ignored, three small warnings were still visible:

 - SC2155: Declare and assign separately to avoid masking return values.

 - SC2046: Quote this to prevent word splitting: can be ignored because
   "ip netns pids" can display more than one pid.

 - SC2166: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.

This probably didn't fix any actual issues but it might help spotting
new interesting warnings reported by ShellCheck as just before,
ShellCheck was reporting issues for most lines making it a bit useless.

Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/mptcp/mptcp_join.sh