All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH mptcp-net] selftests: mptcp: userspace_pm: fix undefined variable port
@ 2026-06-26  7:04 Geliang Tang
  2026-06-26  8:13 ` MPTCP CI
  2026-07-21 17:28 ` Matthieu Baerts
  0 siblings, 2 replies; 3+ messages in thread
From: Geliang Tang @ 2026-06-26  7:04 UTC (permalink / raw)
  To: mptcp; +Cc: Geliang Tang

From: Geliang Tang <tanggeliang@kylinos.cn>

In make_connection(), the variable "port" is used but never defined.
This leads to an empty argument being passed to wait_local_port_listen(),
causing "printf: : invalid number" errors:

 # INFO: Init
 # 01 Created network namespaces ns1, ns2                          [ OK ]
 # INFO: Make connections
 # ./../lib.sh: line 651: printf: : invalid number
 # 02 Established IPv4 MPTCP Connection ns2 => ns1                 [ OK ]
 # INFO: Connection info: 10.0.1.2:59516 -> 10.0.1.1:50002
 # ./../lib.sh: line 651: printf: : invalid number
 # 03 Established IPv6 MPTCP Connection ns2 => ns1                 [ OK ]

Fix it by using the correctly defined variable "app_port", which holds the
appropriate port number for the connection.

Fixes: 39348f5f2f13 ("selftests: mptcp: wait for port instead of sleep")
Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
---
 tools/testing/selftests/net/mptcp/userspace_pm.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/net/mptcp/userspace_pm.sh b/tools/testing/selftests/net/mptcp/userspace_pm.sh
index e9ae1806ab07..30a809752d1b 100755
--- a/tools/testing/selftests/net/mptcp/userspace_pm.sh
+++ b/tools/testing/selftests/net/mptcp/userspace_pm.sh
@@ -212,7 +212,7 @@ make_connection()
 	   ./mptcp_connect -s MPTCP -w 300 -p $app_port -l $listen_addr > /dev/null 2>&1 &
 	local server_pid=$!
 
-	mptcp_lib_wait_local_port_listen "${ns1}" "${port}"
+	mptcp_lib_wait_local_port_listen "${ns1}" "${app_port}"
 
 	# Run the client, transfer $file and stay connected to the server
 	# to conduct tests
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH mptcp-net] selftests: mptcp: userspace_pm: fix undefined variable port
  2026-06-26  7:04 [PATCH mptcp-net] selftests: mptcp: userspace_pm: fix undefined variable port Geliang Tang
@ 2026-06-26  8:13 ` MPTCP CI
  2026-07-21 17:28 ` Matthieu Baerts
  1 sibling, 0 replies; 3+ messages in thread
From: MPTCP CI @ 2026-06-26  8:13 UTC (permalink / raw)
  To: Geliang Tang; +Cc: mptcp

Hi Geliang,

Thank you for your modifications, that's great!

Our CI did some validations and here is its report:

- KVM Validation: normal (except selftest_mptcp_join): Success! ✅
- KVM Validation: normal (only selftest_mptcp_join): Success! ✅
- KVM Validation: debug (except selftest_mptcp_join): Success! ✅
- KVM Validation: debug (only selftest_mptcp_join): Success! ✅
- KVM Validation: btf-normal (only bpftest_all): Success! ✅
- KVM Validation: btf-debug (only bpftest_all): Success! ✅
- Task: https://github.com/multipath-tcp/mptcp_net-next/actions/runs/28223907216

Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/c63b9d67c778
Patchwork: https://patchwork.kernel.org/project/mptcp/list/?series=1116896


If there are some issues, you can reproduce them using the same environment as
the one used by the CI thanks to a docker image, e.g.:

    $ cd [kernel source code]
    $ docker run -v "${PWD}:${PWD}:rw" -w "${PWD}" --privileged --rm -it \
        --pull always mptcp/mptcp-upstream-virtme-docker:latest \
        auto-normal

For more details:

    https://github.com/multipath-tcp/mptcp-upstream-virtme-docker


Please note that despite all the efforts that have been already done to have a
stable tests suite when executed on a public CI like here, it is possible some
reported issues are not due to your modifications. Still, do not hesitate to
help us improve that ;-)

Cheers,
MPTCP GH Action bot
Bot operated by Matthieu Baerts (NGI0 Core)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH mptcp-net] selftests: mptcp: userspace_pm: fix undefined variable port
  2026-06-26  7:04 [PATCH mptcp-net] selftests: mptcp: userspace_pm: fix undefined variable port Geliang Tang
  2026-06-26  8:13 ` MPTCP CI
@ 2026-07-21 17:28 ` Matthieu Baerts
  1 sibling, 0 replies; 3+ messages in thread
From: Matthieu Baerts @ 2026-07-21 17:28 UTC (permalink / raw)
  To: Geliang Tang, mptcp; +Cc: Geliang Tang

Hi Geliang,

On 26/06/2026 09:04, Geliang Tang wrote:
> From: Geliang Tang <tanggeliang@kylinos.cn>
> 
> In make_connection(), the variable "port" is used but never defined.
> This leads to an empty argument being passed to wait_local_port_listen(),
> causing "printf: : invalid number" errors:
> 
>  # INFO: Init
>  # 01 Created network namespaces ns1, ns2                          [ OK ]
>  # INFO: Make connections
>  # ./../lib.sh: line 651: printf: : invalid number
>  # 02 Established IPv4 MPTCP Connection ns2 => ns1                 [ OK ]
>  # INFO: Connection info: 10.0.1.2:59516 -> 10.0.1.1:50002
>  # ./../lib.sh: line 651: printf: : invalid number
>  # 03 Established IPv6 MPTCP Connection ns2 => ns1                 [ OK ]
> 
> Fix it by using the correctly defined variable "app_port", which holds the
> appropriate port number for the connection.

Thank you for the fix, and sorry for the delay!

Arf, I think remember I had this issue, and I thought I fixed it before
sending the patches, but no.

Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>

New patches for t/upstream-net and t/upstream:
- ebaa2571aeaa: selftests: mptcp: userspace_pm: fix undefined variable port
- Results: 4c2362a7db02..08c6392dbaf1 (export-net)
- Results: 4285a4fe811b..ea196b8ada26 (export)

Tests are now in progress:

- export-net:
https://github.com/multipath-tcp/mptcp_net-next/commit/1ef110cb2b759cde24642c71416460cd328469cf/checks
- export:
https://github.com/multipath-tcp/mptcp_net-next/commit/9d33b57982424bae6bd4e53ffe848dc8043fc2d8/checks

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-07-21 17:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-26  7:04 [PATCH mptcp-net] selftests: mptcp: userspace_pm: fix undefined variable port Geliang Tang
2026-06-26  8:13 ` MPTCP CI
2026-07-21 17:28 ` Matthieu Baerts

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.