selftests: mptcp: allow changing subtests prefix
authorMatthieu Baerts (NGI0) <matttbe@kernel.org>
Wed, 31 Jan 2024 21:49:52 +0000 (22:49 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 1 Feb 2024 17:06:38 +0000 (09:06 -0800)
commitde46d138e7735eded9756906747fd3a8c3a42225
treea3c2ced5d7cc3df79ee38b9573addb651c27b2d4
parent5e2f3c65af47e527ccac54060cf909e3306652ff
selftests: mptcp: allow changing subtests prefix

If a CI executes the same selftest multiple times with different
options, all results from the same subtests will have the same title,
which confuse the CI. With the same title printed in TAP, the tests are
considered as the same ones.

Now, it is possible to override this prefix by using MPTCP_LIB_KSFT_TEST
env var, and have a different title.

While at it, use 'basename' to remove the suffix as well instead of
using an extra 'sed'.

Fixes: c4192967e62f ("selftests: mptcp: lib: format subtests results in TAP")
Cc: stable@vger.kernel.org
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://lore.kernel.org/r/20240131-upstream-net-20240131-mptcp-ci-issues-v1-7-4c1c11e571ff@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/mptcp/mptcp_lib.sh