Message ID | fccaccd2e7a1ce8518782c85965a6e26d37a87f9.1721872694.git.tanggeliang@kylinos.cn (mailing list archive) |
---|---|
State | Superseded, archived |
Delegated to: | Matthieu Baerts |
Headers | show |
Series | [mptcp-next] Squash to "selftests/bpf: Add mptcp subflow subtest" | expand |
Context | Check | Description |
---|---|---|
matttbe/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 23 lines checked |
matttbe/shellcheck | success | MPTCP selftests files have not been modified |
matttbe/build | success | Build and static analysis OK |
matttbe/KVM_Validation__normal | success | Success! ✅ |
matttbe/KVM_Validation__debug | success | Success! ✅ |
matttbe/KVM_Validation__btf__only_bpftest_all_ | success | Success! ✅ |
Hi Geliang, 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 (only bpftest_all): Success! ✅ - Task: https://github.com/multipath-tcp/mptcp_net-next/actions/runs/10086967692 Initiator: Patchew Applier Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/4340d56e5f7c Patchwork: https://patchwork.kernel.org/project/mptcp/list/?series=873699 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)
Hi Geliang, Thank you for the patch! On 25/07/2024 03:58, Geliang Tang wrote: > From: Geliang Tang <tanggeliang@kylinos.cn> > > Skip the test with test__skip() for systems that do not > support "ip mptcp", so that CI can also pass. > > Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn> > --- > tools/testing/selftests/bpf/prog_tests/mptcp.c | 11 ++++++----- > 1 file changed, 6 insertions(+), 5 deletions(-) > > diff --git a/tools/testing/selftests/bpf/prog_tests/mptcp.c b/tools/testing/selftests/bpf/prog_tests/mptcp.c > index 00f63f3f19f4..ddef8c61360f 100644 > --- a/tools/testing/selftests/bpf/prog_tests/mptcp.c > +++ b/tools/testing/selftests/bpf/prog_tests/mptcp.c > @@ -357,10 +357,11 @@ static int endpoint_init(char *flags) > SYS(fail, "ip -net %s link set dev veth1 up", NS_TEST); > SYS(fail, "ip -net %s addr add %s/24 dev veth2", NS_TEST, ADDR_2); > SYS(fail, "ip -net %s link set dev veth2 up", NS_TEST); > - /* It would be better to use "ip -net %s mptcp endpoint add %s %s", > - * but the BPF CI is using an old version of IPRoute (5.5.0). > - */ > - SYS(fail, "ip netns exec %s ./mptcp_pm_nl_ctl add %s flags %s", NS_TEST, ADDR_2, flags); > + if (SYS_NOFAIL("ip -net %s mptcp endpoint add %s %s", NS_TEST, ADDR_2, flags)) { This will silently mark the test as skipped, because stderr will be muted. > + /* "ip mptcp" not support, skip this test. */ Could it be possible to at least print this comment? I can add: fprintf(stderr, "'ip mptcp' not supported, skip this test.\n"); when applying the patch. WDYT? > + test__skip(); > + goto fail; > + } > > return 0; > fail: > @@ -435,7 +436,7 @@ static void test_subflow(void) > if (!ASSERT_OK_PTR(nstoken, "create_netns: mptcp_subflow")) > goto skel_destroy; > > - if (!ASSERT_OK(endpoint_init("subflow"), "endpoint_init")) > + if (endpoint_init("subflow")) > goto close_netns; > > run_subflow(skel->data->cc); Cheers, Matt
Hi Matt, On Fri, 2024-07-26 at 11:18 +0200, Matthieu Baerts wrote: > Hi Geliang, > > Thank you for the patch! > > On 25/07/2024 03:58, Geliang Tang wrote: > > From: Geliang Tang <tanggeliang@kylinos.cn> > > > > Skip the test with test__skip() for systems that do not > > support "ip mptcp", so that CI can also pass. > > > > Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn> > > --- > > tools/testing/selftests/bpf/prog_tests/mptcp.c | 11 ++++++----- > > 1 file changed, 6 insertions(+), 5 deletions(-) > > > > diff --git a/tools/testing/selftests/bpf/prog_tests/mptcp.c > > b/tools/testing/selftests/bpf/prog_tests/mptcp.c > > index 00f63f3f19f4..ddef8c61360f 100644 > > --- a/tools/testing/selftests/bpf/prog_tests/mptcp.c > > +++ b/tools/testing/selftests/bpf/prog_tests/mptcp.c > > @@ -357,10 +357,11 @@ static int endpoint_init(char *flags) > > SYS(fail, "ip -net %s link set dev veth1 up", NS_TEST); > > SYS(fail, "ip -net %s addr add %s/24 dev veth2", NS_TEST, > > ADDR_2); > > SYS(fail, "ip -net %s link set dev veth2 up", NS_TEST); > > - /* It would be better to use "ip -net %s mptcp endpoint > > add %s %s", > > - * but the BPF CI is using an old version of IPRoute > > (5.5.0). > > - */ > > - SYS(fail, "ip netns exec %s ./mptcp_pm_nl_ctl add %s flags > > %s", NS_TEST, ADDR_2, flags); > > + if (SYS_NOFAIL("ip -net %s mptcp endpoint add %s %s", > > NS_TEST, ADDR_2, flags)) { > > This will silently mark the test as skipped, because stderr will be > muted. > > > + /* "ip mptcp" not support, skip this test. */ > > Could it be possible to at least print this comment? I can add: > > fprintf(stderr, "'ip mptcp' not supported, skip this test.\n"); > > when applying the patch. WDYT? Martin, BPF maintainer, replied on "[v3 2/3] selftests/bpf: Add mptcp pm_nl_ctl link" recently to suggest us to send a v4 of it, if then, no need to apply this squash-to patch at this moment. Please send a v4 to continue using mptcp pm_nl_ctl. Sorry for the confusion caused. Thanks, -Geliang > > > + test__skip(); > > + goto fail; > > + } > > > > return 0; > > fail: > > @@ -435,7 +436,7 @@ static void test_subflow(void) > > if (!ASSERT_OK_PTR(nstoken, "create_netns: > > mptcp_subflow")) > > goto skel_destroy; > > > > - if (!ASSERT_OK(endpoint_init("subflow"), "endpoint_init")) > > + if (endpoint_init("subflow")) > > goto close_netns; > > > > run_subflow(skel->data->cc); > > Cheers, > Matt
Hi Geliang, On 27/07/2024 03:12, Geliang Tang wrote: > Hi Matt, > > On Fri, 2024-07-26 at 11:18 +0200, Matthieu Baerts wrote: >> Hi Geliang, >> >> Thank you for the patch! >> >> On 25/07/2024 03:58, Geliang Tang wrote: >>> From: Geliang Tang <tanggeliang@kylinos.cn> >>> >>> Skip the test with test__skip() for systems that do not >>> support "ip mptcp", so that CI can also pass. >>> >>> Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn> >>> --- >>> tools/testing/selftests/bpf/prog_tests/mptcp.c | 11 ++++++----- >>> 1 file changed, 6 insertions(+), 5 deletions(-) >>> >>> diff --git a/tools/testing/selftests/bpf/prog_tests/mptcp.c >>> b/tools/testing/selftests/bpf/prog_tests/mptcp.c >>> index 00f63f3f19f4..ddef8c61360f 100644 >>> --- a/tools/testing/selftests/bpf/prog_tests/mptcp.c >>> +++ b/tools/testing/selftests/bpf/prog_tests/mptcp.c >>> @@ -357,10 +357,11 @@ static int endpoint_init(char *flags) >>> SYS(fail, "ip -net %s link set dev veth1 up", NS_TEST); >>> SYS(fail, "ip -net %s addr add %s/24 dev veth2", NS_TEST, >>> ADDR_2); >>> SYS(fail, "ip -net %s link set dev veth2 up", NS_TEST); >>> - /* It would be better to use "ip -net %s mptcp endpoint >>> add %s %s", >>> - * but the BPF CI is using an old version of IPRoute >>> (5.5.0). >>> - */ >>> - SYS(fail, "ip netns exec %s ./mptcp_pm_nl_ctl add %s flags >>> %s", NS_TEST, ADDR_2, flags); >>> + if (SYS_NOFAIL("ip -net %s mptcp endpoint add %s %s", >>> NS_TEST, ADDR_2, flags)) { >> >> This will silently mark the test as skipped, because stderr will be >> muted. >> >>> + /* "ip mptcp" not support, skip this test. */ >> >> Could it be possible to at least print this comment? I can add: >> >> fprintf(stderr, "'ip mptcp' not supported, skip this test.\n"); >> >> when applying the patch. WDYT? > > Martin, BPF maintainer, replied on "[v3 2/3] selftests/bpf: Add mptcp > pm_nl_ctl link" recently to suggest us to send a v4 of it, if then, no > need to apply this squash-to patch at this moment. Please send a v4 to > continue using mptcp pm_nl_ctl. Thank you for this note. The modifications I suggested might require some changes of their CI. I think it should not, but I need to check. In other words, it might take some time. Would it be OK to apply your patch (with the fprintf()) to remove the dependency on mptcp_pm_nl_ctl, and send this first? After or in parallel, I can check what I suggested before. If this modification is accepted, and their CI is still using an old IPRoute version, then we can (re-)add mptcp_pm_nl_ctl. WDYT? > > Sorry for the confusion caused. > > Thanks, > -Geliang > >> >>> + test__skip(); >>> + goto fail; >>> + } >>> >>> return 0; >>> fail: >>> @@ -435,7 +436,7 @@ static void test_subflow(void) >>> if (!ASSERT_OK_PTR(nstoken, "create_netns: >>> mptcp_subflow")) >>> goto skel_destroy; >>> >>> - if (!ASSERT_OK(endpoint_init("subflow"), "endpoint_init")) >>> + if (endpoint_init("subflow")) >>> goto close_netns; >>> >>> run_subflow(skel->data->cc); >> >> Cheers, >> Matt > Cheers, Matt
diff --git a/tools/testing/selftests/bpf/prog_tests/mptcp.c b/tools/testing/selftests/bpf/prog_tests/mptcp.c index 00f63f3f19f4..ddef8c61360f 100644 --- a/tools/testing/selftests/bpf/prog_tests/mptcp.c +++ b/tools/testing/selftests/bpf/prog_tests/mptcp.c @@ -357,10 +357,11 @@ static int endpoint_init(char *flags) SYS(fail, "ip -net %s link set dev veth1 up", NS_TEST); SYS(fail, "ip -net %s addr add %s/24 dev veth2", NS_TEST, ADDR_2); SYS(fail, "ip -net %s link set dev veth2 up", NS_TEST); - /* It would be better to use "ip -net %s mptcp endpoint add %s %s", - * but the BPF CI is using an old version of IPRoute (5.5.0). - */ - SYS(fail, "ip netns exec %s ./mptcp_pm_nl_ctl add %s flags %s", NS_TEST, ADDR_2, flags); + if (SYS_NOFAIL("ip -net %s mptcp endpoint add %s %s", NS_TEST, ADDR_2, flags)) { + /* "ip mptcp" not support, skip this test. */ + test__skip(); + goto fail; + } return 0; fail: @@ -435,7 +436,7 @@ static void test_subflow(void) if (!ASSERT_OK_PTR(nstoken, "create_netns: mptcp_subflow")) goto skel_destroy; - if (!ASSERT_OK(endpoint_init("subflow"), "endpoint_init")) + if (endpoint_init("subflow")) goto close_netns; run_subflow(skel->data->cc);