[PATCH net 0/5] selftests: mptcp: avoid spurious errors on TCP disconnect

Matthieu Baerts (NGI0) posted 5 patches 5 days, 1 hour ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/multipath-tcp/mptcp_net-next tags/patchew/20250912-net-mptcp-fix-sft-connect-v1-0-d40e77cbbf02@kernel.org
There is a newer version of this series
net/mptcp/protocol.c                               | 16 ++++++++++++++++
tools/testing/selftests/net/mptcp/mptcp_connect.c  | 11 ++++++-----
tools/testing/selftests/net/mptcp/mptcp_connect.sh |  6 +++++-
tools/testing/selftests/net/mptcp/mptcp_lib.sh     |  2 +-
4 files changed, 28 insertions(+), 7 deletions(-)
[PATCH net 0/5] selftests: mptcp: avoid spurious errors on TCP disconnect
Posted by Matthieu Baerts (NGI0) 5 days, 1 hour ago
This series should fix the recent instabilities seen by MPTCP and NIPA
CIs where the 'mptcp_connect.sh' tests fail regularly when running the
'disconnect' subtests with "plain" TCP sockets, e.g.

  # INFO: disconnect
  # 63 ns1 MPTCP -> ns1 (10.0.1.1:20001      ) MPTCP     (duration   996ms) [ OK ]
  # 64 ns1 MPTCP -> ns1 (10.0.1.1:20002      ) TCP       (duration   851ms) [ OK ]
  # 65 ns1 TCP   -> ns1 (10.0.1.1:20003      ) MPTCP     Unexpected revents: POLLERR/POLLNVAL(19)
  # (duration   896ms) [FAIL] file received by server does not match (in, out):
  # -rw-r--r-- 1 root root 11112852 Aug 19 09:16 /tmp/tmp.hlJe5DoMoq.disconnect
  # Trailing bytes are:
  # /{ga 6@=#.8:-rw------- 1 root root 10085368 Aug 19 09:16 /tmp/tmp.blClunilxx
  # Trailing bytes are:
  # /{ga 6@=#.8:66 ns1 MPTCP -> ns1 (dead:beef:1::1:20004) MPTCP     (duration   987ms) [ OK ]
  # 67 ns1 MPTCP -> ns1 (dead:beef:1::1:20005) TCP       (duration   911ms) [ OK ]
  # 68 ns1 TCP   -> ns1 (dead:beef:1::1:20006) MPTCP     (duration   980ms) [ OK ]
  # [FAIL] Tests of the full disconnection have failed

These issues started to be visible after some behavioural changes in
TCP, where too quick re-connections after a shutdown() can now be more
easily rejected. Patch 3 modifies the selftests to wait, but this
resolution revealed an issue in MPTCP which is fixed by patch 1 (a fix
for v5.9 kernel).

Patches 2 and 4 improve some errors reported by the selftests, and patch
5 helps with the debugging of such issues.

Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
Note: The last two patches are not strictly fixes, but they are useful
in case similar issues happen again. That's why they have been added
here in this series for -net. If that's an issue, please drop them, and
I can re-send them later on.

---
Matthieu Baerts (NGI0) (5):
      mptcp: propagate shutdown to subflows when possible
      selftests: mptcp: connect: catch IO errors on listen side
      selftests: mptcp: avoid spurious errors on TCP disconnect
      selftests: mptcp: print trailing bytes with od
      selftests: mptcp: connect: print pcap prefix

 net/mptcp/protocol.c                               | 16 ++++++++++++++++
 tools/testing/selftests/net/mptcp/mptcp_connect.c  | 11 ++++++-----
 tools/testing/selftests/net/mptcp/mptcp_connect.sh |  6 +++++-
 tools/testing/selftests/net/mptcp/mptcp_lib.sh     |  2 +-
 4 files changed, 28 insertions(+), 7 deletions(-)
---
base-commit: 2690cb089502b80b905f2abdafd1bf2d54e1abef
change-id: 20250912-net-mptcp-fix-sft-connect-f095ad7a6e36

Best regards,
-- 
Matthieu Baerts (NGI0) <matttbe@kernel.org>
Re: [PATCH net 0/5] selftests: mptcp: avoid spurious errors on TCP disconnect
Posted by patchwork-bot+netdevbpf@kernel.org 1 day, 12 hours ago
Hello:

This series was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Fri, 12 Sep 2025 14:25:49 +0200 you wrote:
> This series should fix the recent instabilities seen by MPTCP and NIPA
> CIs where the 'mptcp_connect.sh' tests fail regularly when running the
> 'disconnect' subtests with "plain" TCP sockets, e.g.
> 
>   # INFO: disconnect
>   # 63 ns1 MPTCP -> ns1 (10.0.1.1:20001      ) MPTCP     (duration   996ms) [ OK ]
>   # 64 ns1 MPTCP -> ns1 (10.0.1.1:20002      ) TCP       (duration   851ms) [ OK ]
>   # 65 ns1 TCP   -> ns1 (10.0.1.1:20003      ) MPTCP     Unexpected revents: POLLERR/POLLNVAL(19)
>   # (duration   896ms) [FAIL] file received by server does not match (in, out):
>   # -rw-r--r-- 1 root root 11112852 Aug 19 09:16 /tmp/tmp.hlJe5DoMoq.disconnect
>   # Trailing bytes are:
>   # /{ga 6@=#.8:-rw------- 1 root root 10085368 Aug 19 09:16 /tmp/tmp.blClunilxx
>   # Trailing bytes are:
>   # /{ga 6@=#.8:66 ns1 MPTCP -> ns1 (dead:beef:1::1:20004) MPTCP     (duration   987ms) [ OK ]
>   # 67 ns1 MPTCP -> ns1 (dead:beef:1::1:20005) TCP       (duration   911ms) [ OK ]
>   # 68 ns1 TCP   -> ns1 (dead:beef:1::1:20006) MPTCP     (duration   980ms) [ OK ]
>   # [FAIL] Tests of the full disconnection have failed
> 
> [...]

Here is the summary with links:
  - [net,1/5] mptcp: propagate shutdown to subflows when possible
    https://git.kernel.org/netdev/net/c/f755be0b1ff4
  - [net,2/5] selftests: mptcp: connect: catch IO errors on listen side
    https://git.kernel.org/netdev/net/c/14e22b43df25
  - [net,3/5] selftests: mptcp: avoid spurious errors on TCP disconnect
    https://git.kernel.org/netdev/net/c/8708c5d8b3fb
  - [net,4/5] selftests: mptcp: print trailing bytes with od
    https://git.kernel.org/netdev/net/c/a17c5aa3a323
  - [net,5/5] selftests: mptcp: connect: print pcap prefix
    https://git.kernel.org/netdev/net/c/cf74e0aa0eb0

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html