selftests: mptcp: join: check for tools only if needed
authorMatthieu Baerts <matthieu.baerts@tessares.net>
Fri, 18 Feb 2022 03:03:10 +0000 (19:03 -0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 18 Feb 2022 03:59:59 +0000 (19:59 -0800)
commit87154755d90ed60919cc5709e322b397701e4f58
tree6cf09394c019f0879ae180ce7240bfcd0ed9691c
parent93827ad58f6296bf15fa72265e55fb0f335fcf84
selftests: mptcp: join: check for tools only if needed

To allow showing the 'help' menu even if these tools are not available.

While at it, also avoid launching the command then checking $?. Instead,
the check is directly done in the 'if'.

Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/mptcp/mptcp_join.sh