]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: mptcp: join: allow running -cCi
authorMatthieu Baerts <matthieu.baerts@tessares.net>
Mon, 7 Mar 2022 20:44:33 +0000 (12:44 -0800)
committerJakub Kicinski <kuba@kernel.org>
Wed, 9 Mar 2022 06:06:11 +0000 (22:06 -0800)
commit5e779a359f3aa57f36c5a3414e4b6397df1761bc
tree8d19247da5bf62f9dad692d8bf3eab5e5f7ea09f
parente3bc113ed0532647964b765c1fe3b04709ebcc38
selftests: mptcp: join: allow running -cCi

Without this patch, no tests would be ran when launching:

  mptcp_join.sh -cCi

In any order or a combination with 2 of these letters.

The recommended way with getopt is first parse all options and then act.

This allows to do some actions in priority, e.g. display the help menu
and stop.

But also some global variables changing the behaviour of this selftests
 -- like the ones behind -cCi options -- can be set before running the
different tests. By doing that, we can also avoid long and unreadable
regex.

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