]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
selftests: mptcp: connect: catch IO errors on listen side
authorMatthieu Baerts (NGI0) <matttbe@kernel.org>
Mon, 22 Sep 2025 00:43:04 +0000 (20:43 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Sep 2025 08:58:55 +0000 (10:58 +0200)
commitff160500c499e92e649103091bbabcb2ac4b4f96
tree99179d5e55e4b23b6e150b21a357c9fd4cf875a0
parentf18be27224246d0e463bc657d98a18f09ce70cd0
selftests: mptcp: connect: catch IO errors on listen side

[ Upstream commit 14e22b43df25dbd4301351b882486ea38892ae4f ]

IO errors were correctly printed to stderr, and propagated up to the
main loop for the server side, but the returned value was ignored. As a
consequence, the program for the listener side was no longer exiting
with an error code in case of IO issues.

Because of that, some issues might not have been seen. But very likely,
most issues either had an effect on the client side, or the file
transfer was not the expected one, e.g. the connection got reset before
the end. Still, it is better to fix this.

The main consequence of this issue is the error that was reported by the
selftests: the received and sent files were different, and the MIB
counters were not printed. Also, when such errors happened during the
'disconnect' tests, the program tried to continue until the timeout.

Now when an IO error is detected, the program exits directly with an
error.

Fixes: 05be5e273c84 ("selftests: mptcp: add disconnect tests")
Cc: stable@vger.kernel.org
Reviewed-by: Mat Martineau <martineau@kernel.org>
Reviewed-by: Geliang Tang <geliang@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20250912-net-mptcp-fix-sft-connect-v1-2-d40e77cbbf02@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/testing/selftests/net/mptcp/mptcp_connect.c