All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH mptcp-next v3] selftests: mptcp: fix incorrect fd checks in main_loop
@ 2025-03-18 11:15 Geliang Tang
  2025-03-18 12:21 ` MPTCP CI
  2025-03-19 17:35 ` Matthieu Baerts
  0 siblings, 2 replies; 4+ messages in thread
From: Geliang Tang @ 2025-03-18 11:15 UTC (permalink / raw)
  To: mptcp; +Cc: Cong Liu, Geliang Tang

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


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

* Re: [PATCH mptcp-next v3] selftests: mptcp: fix incorrect fd checks in main_loop
  2025-03-18 11:15 [PATCH mptcp-next v3] selftests: mptcp: fix incorrect fd checks in main_loop Geliang Tang
@ 2025-03-18 12:21 ` MPTCP CI
  2025-03-19 17:35 ` Matthieu Baerts
  1 sibling, 0 replies; 4+ messages in thread
From: MPTCP CI @ 2025-03-18 12:21 UTC (permalink / raw)
  To: Cong Liu; +Cc: mptcp

Hi Cong,

Thank you for your modifications, that's great!

Our CI did some validations and here is its report:

- KVM Validation: normal: Success! ✅
- KVM Validation: debug: Success! ✅
- KVM Validation: btf-normal (only bpftest_all): Success! ✅
- KVM Validation: btf-debug (only bpftest_all): Unstable: 1 failed test(s): bpftest_test_progs-no_alu32_mptcp 🔴
- Task: https://github.com/multipath-tcp/mptcp_net-next/actions/runs/13922099850

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


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] 4+ messages in thread

* Re: [PATCH mptcp-next v3] selftests: mptcp: fix incorrect fd checks in main_loop
  2025-03-18 11:15 [PATCH mptcp-next v3] selftests: mptcp: fix incorrect fd checks in main_loop Geliang Tang
  2025-03-18 12:21 ` MPTCP CI
@ 2025-03-19 17:35 ` Matthieu Baerts
  2025-03-19 17:40   ` Matthieu Baerts
  1 sibling, 1 reply; 4+ messages in thread
From: Matthieu Baerts @ 2025-03-19 17:35 UTC (permalink / raw)
  To: Geliang Tang, mptcp; +Cc: Cong Liu

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.


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

* Re: [PATCH mptcp-next v3] selftests: mptcp: fix incorrect fd checks in main_loop
  2025-03-19 17:35 ` Matthieu Baerts
@ 2025-03-19 17:40   ` Matthieu Baerts
  0 siblings, 0 replies; 4+ messages in thread
From: Matthieu Baerts @ 2025-03-19 17:40 UTC (permalink / raw)
  To: Geliang Tang, mptcp; +Cc: Cong Liu

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.


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

end of thread, other threads:[~2025-03-19 17:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-18 11:15 [PATCH mptcp-next v3] selftests: mptcp: fix incorrect fd checks in main_loop Geliang Tang
2025-03-18 12:21 ` MPTCP CI
2025-03-19 17:35 ` Matthieu Baerts
2025-03-19 17:40   ` 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.