Skip to content

Commit

Permalink
selftests: mptcp: allow changing subtests prefix
Browse files Browse the repository at this point in the history
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: c419296 ("selftests: mptcp: lib: format subtests results in TAP")
Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
Message-Id: <20240118-selftests-mptcp-simult-slack-qemu-no-kvm-v1-6-f3a4db41c3be@kernel.org>
  • Loading branch information
matttbe authored and Patchew Applier committed Jan 22, 2024
1 parent 9146a41 commit 5301886
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/testing/selftests/net/mptcp/mptcp_lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ readonly KSFT_FAIL=1
readonly KSFT_SKIP=4

# shellcheck disable=SC2155 # declare and assign separately
readonly KSFT_TEST=$(basename "${0}" | sed 's/\.sh$//g')
readonly KSFT_TEST="${MPTCP_LIB_KSFT_TEST:-$(basename "${0}" .sh)}"

MPTCP_LIB_SUBTESTS=()

Expand Down

0 comments on commit 5301886

Please sign in to comment.