Skip to contentSkip to conversation

selftests: mptcp: connect: fix build regression caused by backport

PATCH Applied Kenta Akagi 3 participants 3 messages Oct 2, 2025 – Oct 3, 2025

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 selftests: mptcp: connect: fix build regression caused by backport

Since v6.1.154, mptcp selftests have failed to build with the following errors:

mptcp_connect.c: In function ‘main_loop_s’:
mptcp_connect.c:1040:59: error: ‘winfo’ undeclared (first use in this function)
1040 | err = copyfd_io(fd, remotesock, 1, true, &winfo);
| ^~~~~
mptcp_connect.c:1040:59: note: each undeclared identifier is reported only once for each function it appears in mptcp_connect.c:1040:23: error: too many arguments to function ‘copyfd_io’; expected 4, have 5
1040 | err = copyfd_io(fd, remotesock, 1, true, &winfo);
| ^~~~~~~~~ ~~~~~~
mptcp_connect.c:845:12: note: declared here
845 | static int copyfd_io(int infd, int peerfd, int outfd, bool close_peerfd)

      |            ^~~~~~~~~

This is caused by commit ff160500c499 ("selftests: mptcp: connect: catch IO errors on listen side"), a backport of upstream 14e22b43df25, which attempts to use the undeclared variable 'winfo' and passes too many arguments to copyfd_io(). Both the winfo variable and the updated copyfd_io() function were introduced in upstream
commit ca7ae8916043 ("selftests: mptcp: mptfo Initiator/Listener"), which is not present in v6.1.y.

The goal of the backport is to stop on errors from copyfd_io. Therefore, the backport does not depend on the changes in upstream commit ca7ae8916043 ("selftests: mptcp: mptfo Initiator/Listener").

This commit simply removes ', &winfo' to fix a build failure.

Fixes ff160500c499 ("selftests: mptcp: connect: catch IO errors on listen side")

---
commit 14e22b43df25 ("selftests: mptcp: connect: catch IO errors on listen side") has only been backported to >=v6.1.y, and commit ca7ae8916043 ("selftests: mptcp: mptfo Initiator/Listener") exists from v6.2. so, only v6.1.y requires this fix.

---
 tools/testing/selftests/net/mptcp/mptcp_connect.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/net/mptcp/mptcp_connect.c +1 -1
index 0d49b6753011..0b253c133f06 100644
@@ -1037,7 +1037,7 @@ int main_loop_s(int listensock)
 
 		SOCK_TEST_TCPULP(remotesock, 0);
 
-		err = copyfd_io(fd, remotesock, 1, true, &winfo);
+		err = copyfd_io(fd, remotesock, 1, true);
 	} else {
 		perror("accept");
 		return 1;
Signature · 1 line
2.50.1
maintainer Reviewed-by on v1 1/1
#1 lore raw

Hi Kenta,

Quoted 23 lines · Kenta Akagi

Since v6.1.154, mptcp selftests have failed to build with the following errors:

mptcp_connect.c: In function ‘main_loop_s’:
mptcp_connect.c:1040:59: error: ‘winfo’ undeclared (first use in this function)
1040 | err = copyfd_io(fd, remotesock, 1, true, &winfo);
| ^~~~~
mptcp_connect.c:1040:59: note: each undeclared identifier is reported only once for each function it appears in mptcp_connect.c:1040:23: error: too many arguments to function ‘copyfd_io’; expected 4, have 5
1040 | err = copyfd_io(fd, remotesock, 1, true, &winfo);
| ^~~~~~~~~ ~~~~~~
mptcp_connect.c:845:12: note: declared here
845 | static int copyfd_io(int infd, int peerfd, int outfd, bool close_peerfd)

      |            ^~~~~~~~~

This is caused by commit ff160500c499 ("selftests: mptcp: connect: catch IO errors on listen side"), a backport of upstream 14e22b43df25, which attempts to use the undeclared variable 'winfo' and passes too many arguments to copyfd_io(). Both the winfo variable and the updated copyfd_io() function were introduced in upstream
commit ca7ae8916043 ("selftests: mptcp: mptfo Initiator/Listener"), which is not present in v6.1.y.

Quoted 5 lines

The goal of the backport is to stop on errors from copyfd_io. Therefore, the backport does not depend on the changes in upstream commit ca7ae8916043 ("selftests: mptcp: mptfo Initiator/Listener").

This commit simply removes ', &winfo' to fix a build failure.

Thank you for this fix for v6.1.y!

Cheers,
Matt

Signature · 1 line
Sponsored by the NGI0 Core fund.
maintainer Applied
#2 lore raw

Patch "selftests: mptcp: connect: fix build regression caused by backport" has been added to the 6.1-stable tree

In reply to Kenta Akagi

This is a note to let you know that I've just added the patch titled

selftests: mptcp: connect: fix build regression caused by backport

to the 6.1-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-fix-build-regression-caused-by-backport.patch
and it can be found in the queue-6.1 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] Fri Oct 3 14:56:36 2025
From: Kenta Akagi <[email protected]>
Date: Thu, 2 Oct 2025 23:17:59 +0900
Subject: selftests: mptcp: connect: fix build regression caused by backport
To: [email protected], [email protected]
Cc: [email protected], MPTCP Upstream <[email protected]>, Kenta Akagi <[email protected]>
Message-ID: <[email protected]>

From: Kenta Akagi <[email protected]>

Since v6.1.154, mptcp selftests have failed to build with the following errors:

mptcp_connect.c: In function ‘main_loop_s’:
mptcp_connect.c:1040:59: error: ‘winfo’ undeclared (first use in this function)
1040 | err = copyfd_io(fd, remotesock, 1, true, &winfo);
| ^~~~~
mptcp_connect.c:1040:59: note: each undeclared identifier is reported only once for each function it appears in mptcp_connect.c:1040:23: error: too many arguments to function ‘copyfd_io’; expected 4, have 5
1040 | err = copyfd_io(fd, remotesock, 1, true, &winfo);
| ^~~~~~~~~ ~~~~~~
mptcp_connect.c:845:12: note: declared here
845 | static int copyfd_io(int infd, int peerfd, int outfd, bool close_peerfd)

      |            ^~~~~~~~~

This is caused by commit ff160500c499 ("selftests: mptcp: connect: catch IO errors on listen side"), a backport of upstream 14e22b43df25, which attempts to use the undeclared variable 'winfo' and passes too many arguments to copyfd_io(). Both the winfo variable and the updated copyfd_io() function were introduced in upstream
commit ca7ae8916043 ("selftests: mptcp: mptfo Initiator/Listener"), which is not present in v6.1.y.

The goal of the backport is to stop on errors from copyfd_io. Therefore, the backport does not depend on the changes in upstream commit ca7ae8916043 ("selftests: mptcp: mptfo Initiator/Listener").

This commit simply removes ', &winfo' to fix a build failure.

Fixes ff160500c499 ("selftests: mptcp: connect: catch IO errors on listen side")
---
 tools/testing/selftests/net/mptcp/mptcp_connect.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/net/mptcp/mptcp_connect.c +1 -1
@@ -1037,7 +1037,7 @@ again:
 
 		SOCK_TEST_TCPULP(remotesock, 0);
 
-		err = copyfd_io(fd, remotesock, 1, true, &winfo);
+		err = copyfd_io(fd, remotesock, 1, true);
 	} else {
 		perror("accept");
 		return 1;

Patches currently in stable-queue which might be from [email protected] are

queue-6.1/selftests-mptcp-connect-fix-build-regression-caused-by-backport.patch