FAILED: patch "[PATCH] selftests: mptcp: connect: catch IO errors on listen side" failed to apply to 6.1-stable tree
Subsystems (4)
[email protected]
maintainerThe patch below does not apply to the 6.1-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.1.y
git checkout FETCH_HEAD
git cherry-pick -x 14e22b43df25dbd4301351b882486ea38892ae4f
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2025092157-mullets-tweed-dee4@gregkh' --subject-prefix 'PATCH 6.1.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 14e22b43df25dbd4301351b882486ea38892ae4f Mon Sep 17 00:00:00 2001
From: "Matthieu Baerts (NGI0)" <[email protected]>
Date: Fri, 12 Sep 2025 14:25:51 +0200
Subject: [PATCH] selftests: mptcp: connect: catch IO errors on listen side
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.
tools/testing/selftests/net/mptcp/mptcp_connect.c +4 -3
@@ -1093,6 +1093,7 @@ int main_loop_s(int listensock)struct pollfd polls;socklen_t salen;int remotesock; +int err =0 ;int fd =0 ; again:
@@ -1125,7 +1126,7 @@ int main_loop_s(int listensock)SOCK_TEST_TCPULP (remotesock,0 );memset (&winfo,0 ,sizeof (winfo)); -copyfd_io (fd, remotesock,1 , true, &winfo); + err =copyfd_io (fd, remotesock,1 , true, &winfo); }else {perror ("accept" );return 1 ;
@@ -1134,10 +1135,10 @@ int main_loop_s(int listensock)if (cfg_input)close (fd); -if (--cfg_repeat >0 ) +if (!err && --cfg_repeat >0 ) goto again; -return 0 ; +return err; }static void init_rng (void )
Sasha Levin
maintainerPATCH 1/1 selftests: mptcp: connect: catch IO errors on listen side
From: "Matthieu Baerts (NGI0)" <[email protected]>
[ 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.
--- tools/testing/selftests/net/mptcp/mptcp_connect.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
tools/testing/selftests/net/mptcp/mptcp_connect.c +4 -3
@@ -1005,6 +1005,7 @@ int main_loop_s(int listensock)struct pollfd polls;socklen_t salen;int remotesock; +int err =0 ;int fd =0 ; again:
@@ -1036,7 +1037,7 @@ int main_loop_s(int listensock)SOCK_TEST_TCPULP (remotesock,0 ); -copyfd_io (fd, remotesock,1 , true); + err =copyfd_io (fd, remotesock,1 , true, &winfo); }else {perror ("accept" );return 1 ;
@@ -1045,10 +1046,10 @@ int main_loop_s(int listensock)if (cfg_input)close (fd); -if (--cfg_repeat >0 ) +if (!err && --cfg_repeat >0 ) goto again; -return 0 ; +return err; }static void init_rng (void )
Signature · 1 line
2.51.0