FAILED: patch "[PATCH] selftests: mptcp: connect: also cover alt modes" failed to apply to 5.15-stable tree
Subsystems (4)
[email protected]
maintainerThe patch below does not apply to the 5.15-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-5.15.y
git checkout FETCH_HEAD
git cherry-pick -x 37848a456fc38c191aedfe41f662cc24db8c23d9
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2025072839-wildly-gala-e85f@gregkh' --subject-prefix 'PATCH 5.15.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 37848a456fc38c191aedfe41f662cc24db8c23d9 Mon Sep 17 00:00:00 2001
From: "Matthieu Baerts (NGI0)" <[email protected]>
Date: Tue, 15 Jul 2025 20:43:28 +0200
Subject: [PATCH] selftests: mptcp: connect: also cover alt modes
The "mmap" and "sendfile" alternate modes for mptcp_connect.sh/.c are available from the beginning, but only tested when mptcp_connect.sh is manually launched with "-m mmap" or "-m sendfile", not via the kselftests helpers.
The MPTCP CI was manually running "mptcp_connect.sh -m mmap", but not "-m sendfile". Plus other CIs, especially the ones validating the stable releases, were not validating these alternate modes.
To make sure these modes are validated by these CIs, add two new test programs executing mptcp_connect.sh with the alternate modes.
tools/testing/selftests/net/mptcp/Makefile +2 -1
@@ -4,7 +4,8 @@ top_srcdir = ../../../../.. CFLAGS += -Wall -Wl,--no-as-needed -O2 -g -I$(top_srcdir)/usr/include $(KHDR_INCLUDES) -TEST_PROGS := mptcp_connect.sh pm_netlink.sh mptcp_join.sh diag.sh \ +TEST_PROGS := mptcp_connect.sh mptcp_connect_mmap.sh mptcp_connect_sendfile.sh \ + pm_netlink.sh mptcp_join.sh diag.sh \ simult_flows.sh mptcp_sockopt.sh userspace_pm.sh TEST_GEN_FILES = mptcp_connect pm_nl_ctl mptcp_sockopt mptcp_inq mptcp_diag
tools/testing/selftests/net/mptcp/mptcp_connect_mmap.sh new file +5 -0
@@ -0,0 +1,5 @@ +#!/bin/bash +# SPDX-License-Identifier: GPL-2.0 + +MPTCP_LIB_KSFT_TEST="$(basename "${0}" .sh)" \ + "$(dirname "${0}")/mptcp_connect.sh" -m mmap "${@}"
tools/testing/selftests/net/mptcp/mptcp_connect_sendfile.sh new file +5 -0
@@ -0,0 +1,5 @@ +#!/bin/bash +# SPDX-License-Identifier: GPL-2.0 + +MPTCP_LIB_KSFT_TEST="$(basename "${0}" .sh)" \ + "$(dirname "${0}")/mptcp_connect.sh" -m sendfile "${@}"
Sasha Levin
maintainerPATCH 1/1 selftests: mptcp: connect: also cover alt modes
From: "Matthieu Baerts (NGI0)" <[email protected]>
[ Upstream commit 37848a456fc38c191aedfe41f662cc24db8c23d9 ]
The "mmap" and "sendfile" alternate modes for mptcp_connect.sh/.c are available from the beginning, but only tested when mptcp_connect.sh is manually launched with "-m mmap" or "-m sendfile", not via the kselftests helpers.
The MPTCP CI was manually running "mptcp_connect.sh -m mmap", but not "-m sendfile". Plus other CIs, especially the ones validating the stable releases, were not validating these alternate modes.
To make sure these modes are validated by these CIs, add two new test programs executing mptcp_connect.sh with the alternate modes.
--- tools/testing/selftests/net/mptcp/Makefile | 3 ++- tools/testing/selftests/net/mptcp/mptcp_connect_mmap.sh | 5 +++++ tools/testing/selftests/net/mptcp/mptcp_connect_sendfile.sh | 5 +++++ 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100755 tools/testing/selftests/net/mptcp/mptcp_connect_mmap.sh create mode 100755 tools/testing/selftests/net/mptcp/mptcp_connect_sendfile.sh
tools/testing/selftests/net/mptcp/Makefile +2 -1
@@ -5,7 +5,8 @@ KSFT_KHDR_INSTALL := 1 CFLAGS = -Wall -Wl,--no-as-needed -O2 -g -I$(top_srcdir)/usr/include -TEST_PROGS := mptcp_connect.sh pm_netlink.sh mptcp_join.sh diag.sh \ +TEST_PROGS := mptcp_connect.sh mptcp_connect_mmap.sh mptcp_connect_sendfile.sh \ + pm_netlink.sh mptcp_join.sh diag.sh \ simult_flows.sh mptcp_sockopt.sh TEST_GEN_FILES = mptcp_connect pm_nl_ctl
tools/testing/selftests/net/mptcp/mptcp_connect_mmap.sh new file +5 -0
@@ -0,0 +1,5 @@ +#!/bin/bash +# SPDX-License-Identifier: GPL-2.0 + +MPTCP_LIB_KSFT_TEST="$(basename "${0}" .sh)" \ + "$(dirname "${0}")/mptcp_connect.sh" -m mmap "${@}"
tools/testing/selftests/net/mptcp/mptcp_connect_sendfile.sh new file +5 -0
@@ -0,0 +1,5 @@ +#!/bin/bash +# SPDX-License-Identifier: GPL-2.0 + +MPTCP_LIB_KSFT_TEST="$(basename "${0}" .sh)" \ + "$(dirname "${0}")/mptcp_connect.sh" -m sendfile "${@}"
Signature · 1 line
2.39.5
Matthieu Baerts
maintainerRe: [PATCH 5.15.y] selftests: mptcp: connect: also cover alt modes
Hi Sasha,
Quoted 16 lines · Sasha Levin
From: "Matthieu Baerts (NGI0)" <[email protected]>
[ Upstream commit
37848a456fc38c191aedfe41f662cc24db8c23d9]The "mmap" and "sendfile" alternate modes for mptcp_connect.sh/.c are available from the beginning, but only tested when
mptcp_connect.shis manually launched with "-m mmap" or "-m sendfile", not via the kselftests helpers.The MPTCP CI was manually running "
mptcp_connect.sh-m mmap", but not "-m sendfile". Plus other CIs, especially the ones validating the stable releases, were not validating these alternate modes.To make sure these modes are validated by these CIs, add two new test programs executing
mptcp_connect.shwith the alternate modes.
Quoted 7 lines
Fixes 048d19d444be ("mptcp: add basic kselftest for mptcp")Reviewed-by Geliang Tang <[email protected]>Signed-off-by Matthieu Baerts (NGI0) <[email protected]>Signed-off-by Jakub Kicinski <[email protected]>[ Drop userspace_pm.sh from TEST_PROGS ]
Thank you for having fixed the conflicts.
Is it possible to hold this one for the moment? Yesterday, I was looking at this conflict, and when testing the same resolution as yours, I noticed mptcp_connect_sendfile.sh was failing on v5.15.y. I will investigate that.
Please also note that this patch here will conflict with another you sent a few hours ago:
https://lore.kernel.org/[email protected]
When the issues are fixed, I can send both of them again if that's OK for you.
Cheers,
Matt
Signature · 1 line
Sponsored by the NGI0 Core fund.
Sasha Levin
maintainerRe: [PATCH 5.15.y] selftests: mptcp: connect: also cover alt modes
Quoted 34 lines · Matthieu Baerts
Hi Sasha,
Quoted 16 lines · Sasha Levin
From: "Matthieu Baerts (NGI0)" <[email protected]>
[ Upstream commit
37848a456fc38c191aedfe41f662cc24db8c23d9]The "mmap" and "sendfile" alternate modes for mptcp_connect.sh/.c are available from the beginning, but only tested when
mptcp_connect.shis manually launched with "-m mmap" or "-m sendfile", not via the kselftests helpers.The MPTCP CI was manually running "
mptcp_connect.sh-m mmap", but not "-m sendfile". Plus other CIs, especially the ones validating the stable releases, were not validating these alternate modes.To make sure these modes are validated by these CIs, add two new test programs executing
mptcp_connect.shwith the alternate modes.Quoted 7 lines
Fixes 048d19d444be ("mptcp: add basic kselftest for mptcp")Reviewed-by Geliang Tang <[email protected]>Signed-off-by Matthieu Baerts (NGI0) <[email protected]>Signed-off-by Jakub Kicinski <[email protected]>[ Drop userspace_pm.sh from TEST_PROGS ]Thank you for having fixed the conflicts.
Is it possible to hold this one for the moment? Yesterday, I was looking at this conflict, and when testing the same resolution as yours, I noticed
mptcp_connect_sendfile.shwas failing on v5.15.y. I will investigate that.
Quoted 7 lines
Please also note that this patch here will conflict with another you sent a few hours ago:
https://lore.kernel.org/[email protected]
When the issues are fixed, I can send both of them again if that's OK for you.
Thats perfect, I'll skip backports for there. Thanks!
Signature · 2 lines
Thanks, Sasha
Matthieu Baerts (NGI0)
maintainercover mptcp: fix recent failed backports (20250728)
In reply to [email protected]Greg recently reported 2 patches that could not be applied without conflicts in v5.15:
- 37848a456fc3 ("selftests: mptcp: connect: also cover alt modes")
- fdf0f60a2bb0 ("selftests: mptcp: connect: also cover checksum")
The first one has been resolved by Sasha in [1].
An additional backport was needed to fix issues when running the new sendfile test:
- df9e03aec3b1 ("selftests: mptcp: make sendfile selftest work")
Conflicts have been resolved, and documented in each patch.
Florian Westphal (1):
selftests: mptcp: make sendfile selftest work
Matthieu Baerts (NGI0) (2):
selftests: mptcp: connect: also cover alt modes
selftests: mptcp: connect: also cover checksum
tools/testing/selftests/net/mptcp/Makefile | 3 ++- .../selftests/net/mptcp/mptcp_connect.c | 26 ++++++++++++------- .../net/mptcp/mptcp_connect_checksum.sh | 5 ++++ .../selftests/net/mptcp/mptcp_connect_mmap.sh | 5 ++++ .../net/mptcp/mptcp_connect_sendfile.sh | 5 ++++ 5 files changed, 34 insertions(+), 10 deletions(-) create mode 100755 tools/testing/selftests/net/mptcp/mptcp_connect_checksum.sh create mode 100755 tools/testing/selftests/net/mptcp/mptcp_connect_mmap.sh create mode 100755 tools/testing/selftests/net/mptcp/mptcp_connect_sendfile.sh
Signature · 1 line
2.50.0
Matthieu Baerts (NGI0)
maintainerPATCH 1/3 selftests: mptcp: make sendfile selftest work
In reply to [email protected]From: Florian Westphal <[email protected]>
commit df9e03aec3b14970df05b72d54f8ac9da3ab29e1 upstream.
When the selftest got added, sendfile() on mptcp sockets returned -EOPNOTSUPP, so running 'mptcp_connect.sh -m sendfile' failed immediately.
This is no longer the case, but the script fails anyway due to timeout. Let the receiver know once the sender has sent all data, just like with '-m mmap' mode.
v2: need to respect cfg_wait too, as pm_userspace.sh relied on -m sendfile to keep the connection open (Mat Martineau)
--- .../selftests/net/mptcp/mptcp_connect.c | 26 ++++++++++++------- 1 file changed, 17 insertions(+), 9 deletions(-)
tools/testing/selftests/net/mptcp/mptcp_connect.c +17 -9
@@ -451,6 +451,18 @@ static void set_nonblock(int fd)fcntl (fd,F_SETFL , flags |O_NONBLOCK ); } +static void shut_wr (int fd) +{ +/* Close our write side, ev. give some time +* for address notification and/or checking +* the current status +*/ +if (cfg_wait) +usleep (cfg_wait); + +shutdown (fd,SHUT_WR ); +} +static int copyfd_io_poll (int infd,int peerfd,int outfd,bool *in_closed_after_out) {struct pollfd fds = {
@@ -528,14 +540,7 @@ static int copyfd_io_poll(int infd, int peerfd, int outfd, bool *in_closed_after/* ... and peer also closed already */ break ; -/* ... but we still receive. -* Close our write side, ev. give some time -* for address notification and/or checking -* the current status -*/ -if (cfg_wait) -usleep (cfg_wait); -shutdown (peerfd,SHUT_WR ); +shut_wr (peerfd); }else {if (errno ==EINTR )continue ;
@@ -666,7 +671,7 @@ static int copyfd_io_mmap(int infd, int peerfd, int outfd,if (err)return err; -shutdown (peerfd,SHUT_WR ); +shut_wr (peerfd); err =do_recvfile (peerfd, outfd); *in_closed_after_out = true;
@@ -690,6 +695,9 @@ static int copyfd_io_sendfile(int infd, int peerfd, int outfd, err =do_sendfile (infd, peerfd, size);if (err)return err; + +shut_wr (peerfd); + err =do_recvfile (peerfd, outfd); *in_closed_after_out = true; }
Signature · 1 line
2.50.0
Matthieu Baerts (NGI0)
maintainerPATCH 2/3 selftests: mptcp: connect: also cover alt modes
In reply to [email protected][ Upstream commit 37848a456fc38c191aedfe41f662cc24db8c23d9 ]
The "mmap" and "sendfile" alternate modes for mptcp_connect.sh/.c are available from the beginning, but only tested when mptcp_connect.sh is manually launched with "-m mmap" or "-m sendfile", not via the kselftests helpers.
The MPTCP CI was manually running "mptcp_connect.sh -m mmap", but not "-m sendfile". Plus other CIs, especially the ones validating the stable releases, were not validating these alternate modes.
To make sure these modes are validated by these CIs, add two new test programs executing mptcp_connect.sh with the alternate modes.
--- tools/testing/selftests/net/mptcp/Makefile | 3 ++- tools/testing/selftests/net/mptcp/mptcp_connect_mmap.sh | 5 +++++ tools/testing/selftests/net/mptcp/mptcp_connect_sendfile.sh | 5 +++++ 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100755 tools/testing/selftests/net/mptcp/mptcp_connect_mmap.sh create mode 100755 tools/testing/selftests/net/mptcp/mptcp_connect_sendfile.sh
tools/testing/selftests/net/mptcp/Makefile +2 -1
@@ -5,7 +5,8 @@ KSFT_KHDR_INSTALL := 1 CFLAGS = -Wall -Wl,--no-as-needed -O2 -g -I$(top_srcdir)/usr/include -TEST_PROGS := mptcp_connect.sh pm_netlink.sh mptcp_join.sh diag.sh \ +TEST_PROGS := mptcp_connect.sh mptcp_connect_mmap.sh mptcp_connect_sendfile.sh \ + pm_netlink.sh mptcp_join.sh diag.sh \ simult_flows.sh mptcp_sockopt.sh TEST_GEN_FILES = mptcp_connect pm_nl_ctl
tools/testing/selftests/net/mptcp/mptcp_connect_mmap.sh new file +5 -0
@@ -0,0 +1,5 @@ +#!/bin/bash +# SPDX-License-Identifier: GPL-2.0 + +MPTCP_LIB_KSFT_TEST="$(basename "${0}" .sh)" \ + "$(dirname "${0}")/mptcp_connect.sh" -m mmap "${@}"
tools/testing/selftests/net/mptcp/mptcp_connect_sendfile.sh new file +5 -0
@@ -0,0 +1,5 @@ +#!/bin/bash +# SPDX-License-Identifier: GPL-2.0 + +MPTCP_LIB_KSFT_TEST="$(basename "${0}" .sh)" \ + "$(dirname "${0}")/mptcp_connect.sh" -m sendfile "${@}"
Signature · 1 line
2.50.0
Matthieu Baerts (NGI0)
maintainerPATCH 3/3 selftests: mptcp: connect: also cover checksum
In reply to [email protected]commit fdf0f60a2bb02ba581d9e71d583e69dd0714a521 upstream.
The checksum mode has been added a while ago, but it is only validated when manually launching mptcp_connect.sh with "-C".
The different CIs were then not validating these MPTCP Connect tests with checksum enabled. To make sure they do, add a new test program executing mptcp_connect.sh with the checksum mode.
[ Conflict in Makefile, in the context, because userspace_pm.sh test
has been introduced later, in commit 3ddabc433670 ("selftests: mptcp:
validate userspace PM tests by default"), which is not in this version. ]
--- tools/testing/selftests/net/mptcp/Makefile | 2 +- tools/testing/selftests/net/mptcp/mptcp_connect_checksum.sh | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100755 tools/testing/selftests/net/mptcp/mptcp_connect_checksum.sh
tools/testing/selftests/net/mptcp/Makefile +1 -1
@@ -6,7 +6,7 @@ KSFT_KHDR_INSTALL := 1 CFLAGS = -Wall -Wl,--no-as-needed -O2 -g -I$(top_srcdir)/usr/include TEST_PROGS := mptcp_connect.sh mptcp_connect_mmap.sh mptcp_connect_sendfile.sh \ - pm_netlink.sh mptcp_join.sh diag.sh \ + mptcp_connect_checksum.sh pm_netlink.sh mptcp_join.sh diag.sh \ simult_flows.sh mptcp_sockopt.sh TEST_GEN_FILES = mptcp_connect pm_nl_ctl
tools/testing/selftests/net/mptcp/mptcp_connect_checksum.sh new file +5 -0
@@ -0,0 +1,5 @@ +#!/bin/bash +# SPDX-License-Identifier: GPL-2.0 + +MPTCP_LIB_KSFT_TEST="$(basename "${0}" .sh)" \ + "$(dirname "${0}")/mptcp_connect.sh" -C "${@}"
Signature · 1 line
2.50.0
Sasha Levin
maintainerRe: [PATCH 5.15.y 3/3] selftests: mptcp: connect: also cover checksum
[ Sasha's backport helper bot ]
Hi,
Summary of potential issues:
ℹ️ This is part 3/3 of a series
⚠️ Could not find matching upstream commit
The claimed upstream commit SHA1 (fdf0f60a2bb02ba581d9e71d583e69dd0714a521) was not found.
NOTE: These results are for this patch alone. Full series testing will be performed when all parts are received.
Results of testing on various branches:
| Branch | Patch Apply | Build Test | |---------------------------|-------------|------------| | 5.15 | Success | Success |
Sasha Levin
maintainerRe: [PATCH 5.15.y 1/3] selftests: mptcp: make sendfile selftest work
In reply to Matthieu Baerts (NGI0)[ Sasha's backport helper bot ]
Hi,
✅ All tests passed successfully. No issues detected. No action required from the submitter.
The upstream commit SHA1 provided is correct: df9e03aec3b14970df05b72d54f8ac9da3ab29e1
WARNING: Author mismatch between patch and upstream commit:
Backport author: Matthieu Baerts (NGI0) <[email protected]> Commit author: Florian Westphal <[email protected]>
Status in newer kernel trees:
6.15.y | Present (exact SHA1)
6.12.y | Present (exact SHA1)
6.6.y | Present (exact SHA1)
6.1.y | Present (exact SHA1)
Note: The patch differs from the upstream commit:
---
1: df9e03aec3b1 ! 1: 2b0b67ac1f24 selftests: mptcp: make sendfile selftest work
@@ Metadata
## Commit message ##
selftests: mptcp: make sendfile selftest work
+ commit df9e03aec3b14970df05b72d54f8ac9da3ab29e1 upstream.
+
When the selftest got added, sendfile() on mptcp sockets returned -EOPNOTSUPP, so running 'mptcp_connect.sh -m sendfile' failed immediately.
@@ Commit message
+ Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
## tools/testing/selftests/net/mptcp/mptcp_connect.c ##
-@@ tools/testing/selftests/net/mptcp/mptcp_connect.c: static void set_nonblock(int fd, bool nonblock)
- fcntl(fd, F_SETFL, flags & ~O_NONBLOCK);
+@@ tools/testing/selftests/net/mptcp/mptcp_connect.c: static void set_nonblock(int fd)
+ fcntl(fd, F_SETFL, flags | O_NONBLOCK);
}
+static void shut_wr(int fd)
---
Results of testing on various branches:
| Branch | Patch Apply | Build Test | |---------------------------|-------------|------------| | 5.15 | Success | Success |
Sasha Levin
maintainerRe: [PATCH 5.15.y 2/3] selftests: mptcp: connect: also cover alt modes
In reply to Matthieu Baerts (NGI0)[ Sasha's backport helper bot ]
Hi,
Summary of potential issues:
ℹ️ This is part 2/3 of a series
⚠️ Could not find matching upstream commit
The claimed upstream commit SHA1 (37848a456fc38c191aedfe41f662cc24db8c23d9) was not found.
NOTE: These results are for this patch alone. Full series testing will be performed when all parts are received.
Results of testing on various branches:
| Branch | Patch Apply | Build Test | |---------------------------|-------------|------------| | 5.15 | Success | Success |
Matthieu Baerts
maintainerRe: [PATCH 5.15.y 2/3] selftests: mptcp: connect: also cover alt modes
Hi Sasha,
Quoted 9 lines · Sasha Levin
[ Sasha's backport helper bot ]
Hi,
Summary of potential issues:
ℹ️ This is part 2/3 of a series
⚠️ Could not find matching upstream commitThe claimed upstream commit SHA1 (
37848a456fc38c191aedfe41f662cc24db8c23d9) was not found.
Is there maybe an issue with your bot? The SHA1 looks correct:
Also the same as the one mentioned in Greg's email:
https://lore.kernel.org/2025072839-wildly-gala-e85f@gregkh
Quoted 8 lines
NOTE: These results are for this patch alone. Full series testing will be performed when all parts are received.
Results of testing on various branches:
| Branch | Patch Apply | Build Test | |---------------------------|-------------|------------| | 5.15 | Success | Success |
Cheers,
Matt
Signature · 1 line
Sponsored by the NGI0 Core fund.
Sasha Levin
maintainerRe: [PATCH 5.15.y 2/3] selftests: mptcp: connect: also cover alt modes
Quoted 13 lines · Matthieu Baerts
Hi Sasha,
Quoted 9 lines · Sasha Levin
[ Sasha's backport helper bot ]
Hi,
Summary of potential issues:
ℹ️ This is part 2/3 of a series
⚠️ Could not find matching upstream commitThe claimed upstream commit SHA1 (
37848a456fc38c191aedfe41f662cc24db8c23d9) was not found.
Quoted 7 lines
Is there maybe an issue with your bot? The SHA1 looks correct:
Also the same as the one mentioned in Greg's email:
The SHA1 is correct, but it wasn't in Linus's tree until earlier today via 8be4d31cb8aa ("Merge tag 'net-next-6.17' ofgit://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next").
Signature · 2 lines
Thanks, Sasha
Matthieu Baerts
maintainerRe: [PATCH 5.15.y 2/3] selftests: mptcp: connect: also cover alt modes
Hi Sasha,
Thank you for your reply!
Quoted 20 lines · Sasha Levin
Quoted 19 lines · Matthieu Baerts
Hi Sasha,
Quoted 10 lines · Sasha Levin
[ Sasha's backport helper bot ]
Hi,
Summary of potential issues:
ℹ️ This is part 2/3 of a series
⚠️ Could not find matching upstream commitThe claimed upstream commit SHA1 (
37848a456fc38c191aedfe41f662cc24db8c23d9) was not found.Is there maybe an issue with your bot? The SHA1 looks correct:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
commit/?id=37848a456fc38c191aedfe41f662cc24db8c23d9
Quoted 7 lines
Quoted 3 lines
Also the same as the one mentioned in Greg's email:
The SHA1 is correct, but it wasn't in Linus's tree until earlier today via
8be4d31cb8aa("Merge tag 'net-next-6.17' ofgit://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next").
If I'm not mistaken, the commit was part of a previous pull request via 407c114c983f ("Merge tag 'net-6.16-rc8' ofgit://git.kernel.org/pub/scm/linux/kernel/git/netdev/net"), and was part of the v6.16 release.
But that's OK, a detail I suppose, despite what the bot said yesterday, the SHA1's here and in the other patches are correct :)
Cheers,
Matt
Signature · 1 line
Sponsored by the NGI0 Core fund.
Patch "selftests: mptcp: connect: also cover alt modes" has been added to the 5.15-stable tree
In reply to Matthieu Baerts (NGI0)This is a note to let you know that I've just added the patch titled
selftests: mptcp: connect: also cover alt modes
to the 5.15-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
selftests-mptcp-connect-also-cover-alt-modes.patch
and it can be found in the queue-5.15 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
From [email protected] Wed Jul 30 12:28:53 2025
From: "Matthieu Baerts (NGI0)" <[email protected]>
Date: Wed, 30 Jul 2025 12:28:09 +0200
Subject: selftests: mptcp: connect: also cover alt modes
To: [email protected], [email protected], [email protected]
Cc: "Matthieu Baerts (NGI0)" <[email protected]>, [email protected], Geliang Tang <[email protected]>, Jakub Kicinski <[email protected]>
Message-ID: <[email protected]>
From: "Matthieu Baerts (NGI0)" <[email protected]>
[ Upstream commit 37848a456fc38c191aedfe41f662cc24db8c23d9 ]
The "mmap" and "sendfile" alternate modes for mptcp_connect.sh/.c are available from the beginning, but only tested when mptcp_connect.sh is manually launched with "-m mmap" or "-m sendfile", not via the kselftests helpers.
The MPTCP CI was manually running "mptcp_connect.sh -m mmap", but not "-m sendfile". Plus other CIs, especially the ones validating the stable releases, were not validating these alternate modes.
To make sure these modes are validated by these CIs, add two new test programs executing mptcp_connect.sh with the alternate modes.
--- tools/testing/selftests/net/mptcp/Makefile | 3 ++- tools/testing/selftests/net/mptcp/mptcp_connect_mmap.sh | 5 +++++ tools/testing/selftests/net/mptcp/mptcp_connect_sendfile.sh | 5 +++++ 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100755 tools/testing/selftests/net/mptcp/mptcp_connect_mmap.sh create mode 100755 tools/testing/selftests/net/mptcp/mptcp_connect_sendfile.sh
tools/testing/selftests/net/mptcp/Makefile +2 -1
@@ -5,7 +5,8 @@ KSFT_KHDR_INSTALL := 1 CFLAGS = -Wall -Wl,--no-as-needed -O2 -g -I$(top_srcdir)/usr/include -TEST_PROGS := mptcp_connect.sh pm_netlink.sh mptcp_join.sh diag.sh \ +TEST_PROGS := mptcp_connect.sh mptcp_connect_mmap.sh mptcp_connect_sendfile.sh \ + pm_netlink.sh mptcp_join.sh diag.sh \ simult_flows.sh mptcp_sockopt.sh TEST_GEN_FILES = mptcp_connect pm_nl_ctl
tools/testing/selftests/net/mptcp/mptcp_connect_mmap.sh new file +5 -0
@@ -0,0 +1,5 @@ +#!/bin/bash +# SPDX-License-Identifier: GPL-2.0 + +MPTCP_LIB_KSFT_TEST="$(basename "${0}" .sh)" \ + "$(dirname "${0}")/mptcp_connect.sh" -m mmap "${@}"
tools/testing/selftests/net/mptcp/mptcp_connect_sendfile.sh new file +5 -0
@@ -0,0 +1,5 @@ +#!/bin/bash +# SPDX-License-Identifier: GPL-2.0 + +MPTCP_LIB_KSFT_TEST="$(basename "${0}" .sh)" \ + "$(dirname "${0}")/mptcp_connect.sh" -m sendfile "${@}"
Patches currently in stable-queue which might be from [email protected] are
queue-5.15/mptcp-drop-unused-sk-in-mptcp_push_release.patch queue-5.15/selftests-mptcp-connect-also-cover-alt-modes.patch queue-5.15/mptcp-drop-skb-if-mptcp-skb-extension-allocation-fails.patch queue-5.15/selftests-mptcp-connect-also-cover-checksum.patch queue-5.15/selftests-mptcp-make-sendfile-selftest-work.patch queue-5.15/selftests-mptcp-initialize-variables-to-quiet-gcc-12-warnings.patch queue-5.15/mptcp-pm-kernel-flush-do-not-reset-add_addr-limit.patch queue-5.15/mptcp-do-not-queue-data-on-closed-subflows.patch queue-5.15/selftests-mptcp-add-missing-join-check.patch queue-5.15/mptcp-fix-error-mibs-accounting.patch queue-5.15/mptcp-introduce-mapping_bad_csum.patch
Patch "selftests: mptcp: connect: also cover checksum" has been added to the 5.15-stable tree
In reply to Matthieu Baerts (NGI0)This is a note to let you know that I've just added the patch titled
selftests: mptcp: connect: also cover checksum
to the 5.15-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
selftests-mptcp-connect-also-cover-checksum.patch
and it can be found in the queue-5.15 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
From [email protected] Wed Jul 30 12:28:54 2025
From: "Matthieu Baerts (NGI0)" <[email protected]>
Date: Wed, 30 Jul 2025 12:28:10 +0200
Subject: selftests: mptcp: connect: also cover checksum
To: [email protected], [email protected], [email protected]
Cc: "Matthieu Baerts (NGI0)" <[email protected]>, [email protected], Geliang Tang <[email protected]>, Jakub Kicinski <[email protected]>
Message-ID: <[email protected]>
From: "Matthieu Baerts (NGI0)" <[email protected]>
commit fdf0f60a2bb02ba581d9e71d583e69dd0714a521 upstream.
The checksum mode has been added a while ago, but it is only validated when manually launching mptcp_connect.sh with "-C".
The different CIs were then not validating these MPTCP Connect tests with checksum enabled. To make sure they do, add a new test program executing mptcp_connect.sh with the checksum mode.
[ Conflict in Makefile, in the context, because userspace_pm.sh test
has been introduced later, in commit 3ddabc433670 ("selftests: mptcp:
validate userspace PM tests by default"), which is not in this version. ]
--- tools/testing/selftests/net/mptcp/Makefile | 2 +- tools/testing/selftests/net/mptcp/mptcp_connect_checksum.sh | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100755 tools/testing/selftests/net/mptcp/mptcp_connect_checksum.sh
tools/testing/selftests/net/mptcp/Makefile +1 -1
@@ -6,7 +6,7 @@ KSFT_KHDR_INSTALL := 1 CFLAGS = -Wall -Wl,--no-as-needed -O2 -g -I$(top_srcdir)/usr/include TEST_PROGS := mptcp_connect.sh mptcp_connect_mmap.sh mptcp_connect_sendfile.sh \ - pm_netlink.sh mptcp_join.sh diag.sh \ + mptcp_connect_checksum.sh pm_netlink.sh mptcp_join.sh diag.sh \ simult_flows.sh mptcp_sockopt.sh TEST_GEN_FILES = mptcp_connect pm_nl_ctl
tools/testing/selftests/net/mptcp/mptcp_connect_checksum.sh new file +5 -0
@@ -0,0 +1,5 @@ +#!/bin/bash +# SPDX-License-Identifier: GPL-2.0 + +MPTCP_LIB_KSFT_TEST="$(basename "${0}" .sh)" \ + "$(dirname "${0}")/mptcp_connect.sh" -C "${@}"
Patches currently in stable-queue which might be from [email protected] are
queue-5.15/mptcp-drop-unused-sk-in-mptcp_push_release.patch queue-5.15/selftests-mptcp-connect-also-cover-alt-modes.patch queue-5.15/mptcp-drop-skb-if-mptcp-skb-extension-allocation-fails.patch queue-5.15/selftests-mptcp-connect-also-cover-checksum.patch queue-5.15/selftests-mptcp-make-sendfile-selftest-work.patch queue-5.15/selftests-mptcp-initialize-variables-to-quiet-gcc-12-warnings.patch queue-5.15/mptcp-pm-kernel-flush-do-not-reset-add_addr-limit.patch queue-5.15/mptcp-do-not-queue-data-on-closed-subflows.patch queue-5.15/selftests-mptcp-add-missing-join-check.patch queue-5.15/mptcp-fix-error-mibs-accounting.patch queue-5.15/mptcp-introduce-mapping_bad_csum.patch
Patch "selftests: mptcp: make sendfile selftest work" has been added to the 5.15-stable tree
In reply to Matthieu Baerts (NGI0)This is a note to let you know that I've just added the patch titled
selftests: mptcp: make sendfile selftest work
to the 5.15-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
selftests-mptcp-make-sendfile-selftest-work.patch
and it can be found in the queue-5.15 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
From [email protected] Wed Jul 30 12:28:51 2025
From: "Matthieu Baerts (NGI0)" <[email protected]>
Date: Wed, 30 Jul 2025 12:28:08 +0200
Subject: selftests: mptcp: make sendfile selftest work
To: [email protected], [email protected], [email protected]
Cc: Florian Westphal <[email protected]>, [email protected], Xiumei Mu <[email protected]>, Mat Martineau <[email protected]>, "David S. Miller" <[email protected]>, "Matthieu Baerts (NGI0)" <[email protected]>
Message-ID: <[email protected]>
From: Florian Westphal <[email protected]>
commit df9e03aec3b14970df05b72d54f8ac9da3ab29e1 upstream.
When the selftest got added, sendfile() on mptcp sockets returned -EOPNOTSUPP, so running 'mptcp_connect.sh -m sendfile' failed immediately.
This is no longer the case, but the script fails anyway due to timeout. Let the receiver know once the sender has sent all data, just like with '-m mmap' mode.
v2: need to respect cfg_wait too, as pm_userspace.sh relied on -m sendfile to keep the connection open (Mat Martineau)
--- tools/testing/selftests/net/mptcp/mptcp_connect.c | 26 ++++++++++++++-------- 1 file changed, 17 insertions(+), 9 deletions(-)
tools/testing/selftests/net/mptcp/mptcp_connect.c +17 -9
@@ -451,6 +451,18 @@ static void set_nonblock(int fd)fcntl (fd,F_SETFL , flags |O_NONBLOCK ); } +static void shut_wr (int fd) +{ +/* Close our write side, ev. give some time +* for address notification and/or checking +* the current status +*/ +if (cfg_wait) +usleep (cfg_wait); + +shutdown (fd,SHUT_WR ); +} +static int copyfd_io_poll (int infd,int peerfd,int outfd,bool *in_closed_after_out) {struct pollfd fds = {
@@ -528,14 +540,7 @@ static int copyfd_io_poll(int infd, int/* ... and peer also closed already */ break ; -/* ... but we still receive. -* Close our write side, ev. give some time -* for address notification and/or checking -* the current status -*/ -if (cfg_wait) -usleep (cfg_wait); -shutdown (peerfd,SHUT_WR ); +shut_wr (peerfd); }else {if (errno ==EINTR )continue ;
@@ -666,7 +671,7 @@ static int copyfd_io_mmap(int infd, intif (err)return err; -shutdown (peerfd,SHUT_WR ); +shut_wr (peerfd); err =do_recvfile (peerfd, outfd); *in_closed_after_out = true;
@@ -690,6 +695,9 @@ static int copyfd_io_sendfile(int infd, err =do_sendfile (infd, peerfd, size);if (err)return err; + +shut_wr (peerfd); + err =do_recvfile (peerfd, outfd); *in_closed_after_out = true; }
Patches currently in stable-queue which might be from [email protected] are
queue-5.15/mptcp-drop-unused-sk-in-mptcp_push_release.patch queue-5.15/selftests-mptcp-connect-also-cover-alt-modes.patch queue-5.15/mptcp-drop-skb-if-mptcp-skb-extension-allocation-fails.patch queue-5.15/selftests-mptcp-connect-also-cover-checksum.patch queue-5.15/selftests-mptcp-make-sendfile-selftest-work.patch queue-5.15/selftests-mptcp-initialize-variables-to-quiet-gcc-12-warnings.patch queue-5.15/mptcp-pm-kernel-flush-do-not-reset-add_addr-limit.patch queue-5.15/mptcp-do-not-queue-data-on-closed-subflows.patch queue-5.15/selftests-mptcp-add-missing-join-check.patch queue-5.15/mptcp-fix-error-mibs-accounting.patch queue-5.15/mptcp-introduce-mapping_bad_csum.patch