[PATCH mptcp-next] Squash to "selftests/bpf: Add bpf_first test"

Geliang Tang posted 1 patch 3 years, 3 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/multipath-tcp/mptcp_net-next tags/patchew/f5ce13a35164d0c81c47b807d146632795f6255c.1654752190.git.geliang.tang@suse.com
Maintainers: Matthieu Baerts <matthieu.baerts@tessares.net>, Alexei Starovoitov <ast@kernel.org>, John Fastabend <john.fastabend@gmail.com>, KP Singh <kpsingh@kernel.org>, Mat Martineau <mathew.j.martineau@linux.intel.com>, Yonghong Song <yhs@fb.com>, Song Liu <songliubraving@fb.com>, Daniel Borkmann <daniel@iogearbox.net>, Shuah Khan <shuah@kernel.org>, Martin KaFai Lau <kafai@fb.com>, Andrii Nakryiko <andrii@kernel.org>
There is a newer version of this series
tools/testing/selftests/bpf/prog_tests/mptcp.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
[PATCH mptcp-next] Squash to "selftests/bpf: Add bpf_first test"
Posted by Geliang Tang 3 years, 3 months ago
A small cleanup, separate the code of base subtest and sched subtest, do
not mix them together.

Signed-off-by: Geliang Tang <geliang.tang@suse.com>
---
 tools/testing/selftests/bpf/prog_tests/mptcp.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/tools/testing/selftests/bpf/prog_tests/mptcp.c b/tools/testing/selftests/bpf/prog_tests/mptcp.c
index 9f3242c7920a..8426a5aba721 100644
--- a/tools/testing/selftests/bpf/prog_tests/mptcp.c
+++ b/tools/testing/selftests/bpf/prog_tests/mptcp.c
@@ -15,9 +15,6 @@
 #define TCP_CA_NAME_MAX	16
 #endif
 
-#define ADDR_1	"10.0.1.1"
-#define ADDR_2	"10.0.1.2"
-
 struct mptcp_storage {
 	__u32 invoked;
 	__u32 is_mptcp;
@@ -27,9 +24,6 @@ struct mptcp_storage {
 	char ca_name[TCP_CA_NAME_MAX];
 };
 
-static const unsigned int total_bytes = 10 * 1024 * 1024;
-static int stop, duration;
-
 static int verify_tsk(int map_fd, int client_fd)
 {
 	int err, cfd = client_fd;
@@ -177,6 +171,9 @@ static void test_base(void)
 	close(cgroup_fd);
 }
 
+static const unsigned int total_bytes = 10 * 1024 * 1024;
+static int stop, duration;
+
 static void *server(void *arg)
 {
 	int lfd = (int)(long)arg, err = 0, fd;
@@ -256,6 +253,9 @@ static void send_data(int lfd, int fd)
 	      PTR_ERR(thread_ret));
 }
 
+#define ADDR_1	"10.0.1.1"
+#define ADDR_2	"10.0.1.2"
+
 static void sched_init(char *flags, char *sched)
 {
 	char cmd[64];
-- 
2.35.3


Re: [PATCH mptcp-next] Squash to "selftests/bpf: Add bpf_first test"
Posted by Mat Martineau 3 years, 3 months ago
On Thu, 9 Jun 2022, Geliang Tang wrote:

> A small cleanup, separate the code of base subtest and sched subtest, do
> not mix them together.
>
> Signed-off-by: Geliang Tang <geliang.tang@suse.com>
> ---
> tools/testing/selftests/bpf/prog_tests/mptcp.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>

Fine with me to rearrange this test code and squash this, thanks Geliang.


- Mat


> diff --git a/tools/testing/selftests/bpf/prog_tests/mptcp.c b/tools/testing/selftests/bpf/prog_tests/mptcp.c
> index 9f3242c7920a..8426a5aba721 100644
> --- a/tools/testing/selftests/bpf/prog_tests/mptcp.c
> +++ b/tools/testing/selftests/bpf/prog_tests/mptcp.c
> @@ -15,9 +15,6 @@
> #define TCP_CA_NAME_MAX	16
> #endif
>
> -#define ADDR_1	"10.0.1.1"
> -#define ADDR_2	"10.0.1.2"
> -
> struct mptcp_storage {
> 	__u32 invoked;
> 	__u32 is_mptcp;
> @@ -27,9 +24,6 @@ struct mptcp_storage {
> 	char ca_name[TCP_CA_NAME_MAX];
> };
>
> -static const unsigned int total_bytes = 10 * 1024 * 1024;
> -static int stop, duration;
> -
> static int verify_tsk(int map_fd, int client_fd)
> {
> 	int err, cfd = client_fd;
> @@ -177,6 +171,9 @@ static void test_base(void)
> 	close(cgroup_fd);
> }
>
> +static const unsigned int total_bytes = 10 * 1024 * 1024;
> +static int stop, duration;
> +
> static void *server(void *arg)
> {
> 	int lfd = (int)(long)arg, err = 0, fd;
> @@ -256,6 +253,9 @@ static void send_data(int lfd, int fd)
> 	      PTR_ERR(thread_ret));
> }
>
> +#define ADDR_1	"10.0.1.1"
> +#define ADDR_2	"10.0.1.2"
> +
> static void sched_init(char *flags, char *sched)
> {
> 	char cmd[64];
> -- 
> 2.35.3
>
>
>

--
Mat Martineau
Intel

Re: [PATCH mptcp-next] Squash to "selftests/bpf: Add bpf_first test"
Posted by Matthieu Baerts 3 years, 3 months ago
Hi Geliang, Mat,

On 09/06/2022 17:27, Mat Martineau wrote:
> On Thu, 9 Jun 2022, Geliang Tang wrote:
> 
>> A small cleanup, separate the code of base subtest and sched subtest, do
>> not mix them together.
>>
>> Signed-off-by: Geliang Tang <geliang.tang@suse.com>
>> ---
>> tools/testing/selftests/bpf/prog_tests/mptcp.c | 12 ++++++------
>> 1 file changed, 6 insertions(+), 6 deletions(-)
>>
> 
> Fine with me to rearrange this test code and squash this, thanks Geliang.

Thank you for the patch and the review!

- 0729c68393d5: "squashed" in "selftests/bpf: Add bpf_first test"
- Results: 19fb763aac71..a9fc640fbfb4 (export)

Builds and tests are now in progress:

https://cirrus-ci.com/github/multipath-tcp/mptcp_net-next/export/20220609T162747
https://github.com/multipath-tcp/mptcp_net-next/actions/workflows/build-validation.yml?query=branch:export

Cheers,
Matt
-- 
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net