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