selftests: mptcp: join: define tests groups once
authorMatthieu Baerts <matthieu.baerts@tessares.net>
Wed, 9 Mar 2022 19:16:28 +0000 (11:16 -0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 10 Mar 2022 20:29:57 +0000 (12:29 -0800)
commit3afd0280e7d323c2b8df458cefecc9e4b3bec570
tree130d18407d03f1d96a498c1bdfe6eda9f7335eb0
parent3c082695e78b99bba177725bf509ad3230f8287c
selftests: mptcp: join: define tests groups once

When adding a new tests group, it has to be defined in multiple places:

- in the all_tests() function
- in the 'usage()' function
- in the getopts: short option + what to do when the option is used

Because it is easy to forget one of them, it is useful to have to define
them only once.

Note: only using an associative array would simplify the code but the
entries are stored in a hashtable and iterating over the different items
doesn't give the same order as the one used in the declaration of this
array. Because we want to run these tests in the same order as before, a
"simple" array is used first.

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