]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit1e1d07f6fddabc8307fafaf6971e801ebd0cf050
tree130d18407d03f1d96a498c1bdfe6eda9f7335eb0
parentd5a38e92a7b9bc0f1c9d21b834369a4dda248843
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