tools/testing/selftests/net/mptcp/mptcp_connect.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
From: Cong Liu <liucong2@kylinos.cn>
Fix a bug where the code was checking the wrong file descriptors
when opening the input files. The code was checking 'fd' instead
of 'fd_in', which could lead to incorrect error handling.
Fixes: 05be5e273c84 ("selftests: mptcp: add disconnect tests")
Fixes: ca7ae8916043 ("selftests: mptcp: mptfo Initiator/Listener")
Co-developed-by: Geliang Tang <geliang@kernel.org>
Signed-off-by: Geliang Tang <geliang@kernel.org>
Signed-off-by: Cong Liu <liucong2@kylinos.cn>
---
v3:
- resend the pending patch from Cong Liu, he said to me that he has
no time to deal with this recently.
- add another "Fixes" tag as Matt suggested.
- update the subject and commit log.
v2:
- https://patchwork.kernel.org/project/mptcp/patch/20250116085459.31419-1-liucong2@kylinos.cn/
---
tools/testing/selftests/net/mptcp/mptcp_connect.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.c b/tools/testing/selftests/net/mptcp/mptcp_connect.c
index d240d02fa443..893dc36b12f6 100644
--- a/tools/testing/selftests/net/mptcp/mptcp_connect.c
+++ b/tools/testing/selftests/net/mptcp/mptcp_connect.c
@@ -1270,7 +1270,7 @@ int main_loop(void)
if (cfg_input && cfg_sockopt_types.mptfo) {
fd_in = open(cfg_input, O_RDONLY);
- if (fd < 0)
+ if (fd_in < 0)
xerror("can't open %s:%d", cfg_input, errno);
}
@@ -1293,7 +1293,7 @@ int main_loop(void)
if (cfg_input && !cfg_sockopt_types.mptfo) {
fd_in = open(cfg_input, O_RDONLY);
- if (fd < 0)
+ if (fd_in < 0)
xerror("can't open %s:%d", cfg_input, errno);
}
--
2.43.0
Hi Geliang, Cong,
On 18/03/2025 12:15, Geliang Tang wrote:
> From: Cong Liu <liucong2@kylinos.cn>
>
> Fix a bug where the code was checking the wrong file descriptors
> when opening the input files. The code was checking 'fd' instead
> of 'fd_in', which could lead to incorrect error handling.
>
> Fixes: 05be5e273c84 ("selftests: mptcp: add disconnect tests")
> Fixes: ca7ae8916043 ("selftests: mptcp: mptfo Initiator/Listener")
> Co-developed-by: Geliang Tang <geliang@kernel.org>
> Signed-off-by: Geliang Tang <geliang@kernel.org>
> Signed-off-by: Cong Liu <liucong2@kylinos.cn>
> ---
>
> v3:
> - resend the pending patch from Cong Liu, he said to me that he has
> no time to deal with this recently.
> - add another "Fixes" tag as Matt suggested.
> - update the subject and commit log.
Thank you for the v3!
It looks good to me:
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Small detail: that's for mptcp-net, not next.
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
On 19/03/2025 18:35, Matthieu Baerts wrote:
> Hi Geliang, Cong,
>
> On 18/03/2025 12:15, Geliang Tang wrote:
>> From: Cong Liu <liucong2@kylinos.cn>
>>
>> Fix a bug where the code was checking the wrong file descriptors
>> when opening the input files. The code was checking 'fd' instead
>> of 'fd_in', which could lead to incorrect error handling.
>>
>> Fixes: 05be5e273c84 ("selftests: mptcp: add disconnect tests")
>> Fixes: ca7ae8916043 ("selftests: mptcp: mptfo Initiator/Listener")
>> Co-developed-by: Geliang Tang <geliang@kernel.org>
>> Signed-off-by: Geliang Tang <geliang@kernel.org>
>> Signed-off-by: Cong Liu <liucong2@kylinos.cn>
>> ---
>>
>> v3:
>> - resend the pending patch from Cong Liu, he said to me that he has
>> no time to deal with this recently.
>> - add another "Fixes" tag as Matt suggested.
>> - update the subject and commit log.
>
> Thank you for the v3!
Now in our tree:
New patches for t/upstream-net and t/upstream:
- f1aedae2b9e9: selftests: mptcp: fix incorrect fd checks in main_loop
- Results: 337db8693fa1..15fd746f34c5 (export-net)
- Results: 8131e8aff41d..2bea3081157b (export)
Tests are now in progress:
- export-net:
https://github.com/multipath-tcp/mptcp_net-next/commit/9faaf0099006d44557034273d9204d64385cfb1a/checks
- export:
https://github.com/multipath-tcp/mptcp_net-next/commit/b1252371e4122d56004e65cece710905a3de6334/checks
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
© 2016 - 2026 Red Hat, Inc.