Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests: mptcp: userspace_pm: unique subtest names

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: f589234e1af0 ("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>

authored by

Matthieu Baerts (NGI0) and committed by
David S. Miller
2ef0d804 4d8e0dde

+2 -2
+2 -2
tools/testing/selftests/net/mptcp/userspace_pm.sh
··· 75 75 { 76 76 test_name="${1}" 77 77 78 - _printf "%-63s" "${test_name}" 78 + _printf "%-68s" "${test_name}" 79 79 } 80 80 81 81 print_results() ··· 542 542 local remid 543 543 local info 544 544 545 - info="${e_saddr} (${e_from}) => ${e_daddr} (${e_to})" 545 + info="${e_saddr} (${e_from}) => ${e_daddr}:${e_dport} (${e_to})" 546 546 547 547 if [ "$e_type" = "$SUB_ESTABLISHED" ] 548 548 then