]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests: mptcp: join: fix wait_mpj helper
authorMatthieu Baerts (NGI0) <matttbe@kernel.org>
Tue, 3 Feb 2026 18:41:26 +0000 (19:41 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 5 Feb 2026 02:45:34 +0000 (18:45 -0800)
commitab8b64ca3af30658ed04293b00ada9b65f45cc59
tree327a4e004b1beac307e81b50c4be94544894060d
parent32207bed0547b0294302f2a4fe63571fff91a85e
selftests: mptcp: join: fix wait_mpj helper

It looks like most of the time, this helper was simply waiting a bit
more than one second: the previous MPJoin counter was often already at
the expected value. So at the end, it was just checking 10 times for
the MPJoin counter to change, but it was not happening. For the tests,
that was time, it was just waiting longer for nothing.

Instead, use 'wait_mpj' with the expected counter: in the tests, the MPJ
counter can easily be predicted. While at it, stop passing the netns as
argument: here the received MPJoin ACK is checked, which happens on the
server side. If later on, this needs to be checked on the client side,
the helper can be adapted for this case, but better avoid confusions now
if it is not needed.

While at it, stop using 'i' for the variable if it is not used.

With this, the tests can finish quicker.

Reviewed-by: Geliang Tang <geliang@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20260203-net-next-mptcp-misc-feat-6-20-v1-10-31ec8bfc56d1@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/mptcp/mptcp_join.sh