]> 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)
commitb1fa95f3591794923c9e5585407222d034b806c2
tree8d19247da5bf62f9dad692d8bf3eab5e5f7ea09f
parent84bf5c6ad8fbf9f0e3875ec656850bd1642f2750
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