[PATCH mptcp-next v2] Squash to "selftests/bpf: Add mptcp subflow subtest"

Geliang Tang posted 1 patch 1 month, 4 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/multipath-tcp/mptcp_net-next tags/patchew/d3b644bf82543591f2f59b37d1c1b26a2b9f88e0.1724145512.git.tanggeliang@kylinos.cn
tools/testing/selftests/bpf/prog_tests/mptcp.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
[PATCH mptcp-next v2] Squash to "selftests/bpf: Add mptcp subflow subtest"
Posted by Geliang Tang 1 month, 4 weeks ago
From: Geliang Tang <tanggeliang@kylinos.cn>

Close client_fd as Martin suggested.

Please update my email address of this patch squashed to as:

  From: Geliang Tang <tanggeliang@kylinos.cn>

since BPF CI complained about it:

WARNING: From:/Signed-off-by: email address mismatch: 'From: Geliang Tang <geliang@kernel.org>' != 'Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>'

Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
---
v2:
 - use close_client/close_server.
---
 tools/testing/selftests/bpf/prog_tests/mptcp.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/tools/testing/selftests/bpf/prog_tests/mptcp.c b/tools/testing/selftests/bpf/prog_tests/mptcp.c
index 9d4e3c1d4e7b..73adc58cd776 100644
--- a/tools/testing/selftests/bpf/prog_tests/mptcp.c
+++ b/tools/testing/selftests/bpf/prog_tests/mptcp.c
@@ -383,7 +383,7 @@ static void run_subflow(char *new)
 {
 	int server_fd, client_fd, err;
 	char cc[TCP_CA_NAME_MAX];
-	socklen_t len = sizeof(cc);
+	socklen_t len;
 
 	server_fd = start_mptcp_server(AF_INET, ADDR_1, PORT_1, 0);
 	if (!ASSERT_GE(server_fd, 0, "start_mptcp_server"))
@@ -391,11 +391,12 @@ static void run_subflow(char *new)
 
 	client_fd = connect_to_fd(server_fd, 0);
 	if (!ASSERT_GE(client_fd, 0, "connect to fd"))
-		goto fail;
+		goto close_server;
 
+	len = sizeof(cc);
 	err = getsockopt(server_fd, SOL_TCP, TCP_CONGESTION, cc, &len);
-	if (!ASSERT_OK(err, "getsockopt(srv_fd, TCP_CONGESTION)"))
-		goto fail;
+	if (!ASSERT_OK(err, "getsockopt(server_fd, TCP_CONGESTION)"))
+		goto close_client;
 
 	send_byte(client_fd);
 
@@ -404,8 +405,9 @@ static void run_subflow(char *new)
 	ASSERT_OK(ss_search(ADDR_1, new), "ss_search new cc");
 	ASSERT_OK(ss_search(ADDR_2, cc), "ss_search default cc");
 
+close_client:
 	close(client_fd);
-fail:
+close_server:
 	close(server_fd);
 }
 
-- 
2.43.0
Re: [PATCH mptcp-next v2] Squash to "selftests/bpf: Add mptcp subflow subtest"
Posted by Matthieu Baerts 1 month, 4 weeks ago
Hi Geliang,

Thank you for the v2.

On 20/08/2024 11:19, Geliang Tang wrote:
> From: Geliang Tang <tanggeliang@kylinos.cn>
> 
> Close client_fd as Martin suggested.
> 
> Please update my email address of this patch squashed to as:
> 
>   From: Geliang Tang <tanggeliang@kylinos.cn>
> 
> since BPF CI complained about it:
> 
> WARNING: From:/Signed-off-by: email address mismatch: 'From: Geliang Tang <geliang@kernel.org>' != 'Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>'

The patch is in fact correct, but the modification is done by 'b4' when
sending the patch. In fact, it is due to 'git' that is being used, which
converts your @kylinos.cn email to your @kernel.org one, using the
mailmap file.

I will check if this behaviour can be modified.

> Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
> ---
> v2:
>  - use close_client/close_server.

Thanks, it looks good to me!

New patches for t/upstream:
- 826f774c43cd: "squashed" in "selftests/bpf: Add mptcp subflow subtest"
- Results: a664f1d4a847..23c28f8bc503 (export)

Tests are now in progress:

- export:
https://github.com/multipath-tcp/mptcp_net-next/commit/4e59dc87bc7f3470c557c163d262bad00da82050/checks

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