Skip to content

Commit

Permalink
selftests: mptcp: userspace_pm: unique subtest names
Browse files Browse the repository at this point in the history
commit 2ef0d80 upstream.

It is important to have a unique (sub)test name in TAP, because some CI
environments drop tests with duplicated names.

Some subtests from the userspace_pm selftest had the same names. That's
because different subflows are created (and deleted) between the same
pair of IP addresses.

Simply adding the destination port in the name is then enough to have
different names, because the destination port is always different.

Note that adding such info takes a bit more space, so we need to
increase a bit the width to print the name, simply to keep all the
'[ OK ]' aligned as before.

Fixes: f589234 ("selftests: mptcp: userspace_pm: format subtests results in TAP")
Cc: stable@vger.kernel.org
Reviewed-by: Geliang Tang <geliang@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
matttbe authored and gregkh committed Mar 1, 2024
1 parent 1ea7b25 commit 5b9bc8e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/testing/selftests/net/mptcp/userspace_pm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ print_test()
{
test_name="${1}"

_printf "%-63s" "${test_name}"
_printf "%-68s" "${test_name}"
}

print_results()
Expand Down Expand Up @@ -555,7 +555,7 @@ verify_subflow_events()
local remid
local info

info="${e_saddr} (${e_from}) => ${e_daddr} (${e_to})"
info="${e_saddr} (${e_from}) => ${e_daddr}:${e_dport} (${e_to})"

if [ "$e_type" = "$SUB_ESTABLISHED" ]
then
Expand Down

0 comments on commit 5b9bc8e

Please sign in to comment.