* [PATCH mptcp-next v6 0/2] patches for new MPTCP subflow subtest
@ 2024-05-15 10:38 Geliang Tang
2024-05-15 10:38 ` [PATCH mptcp-next v6 1/2] selftests/bpf: Add mptcp pm_nl_ctl link Geliang Tang
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Geliang Tang @ 2024-05-15 10:38 UTC (permalink / raw)
To: mptcp; +Cc: Geliang Tang
From: Geliang Tang <tanggeliang@kylinos.cn>
v6:
- fix CI errors.
- rebased.
v5:
- move checkpatch.pl fix out of this set.
- update patch 2 as Matt suggested.
v4:
- "{*/,}" can't be used in MAINTAINERS, fix it.
- fix checkpatch too.
v3:
- update MAINTAINERS.
- drop '-M' in _ss_search() as Matt suggested.
v2:
- rename pm_nl_ctl to mptcp_pm_nl_ctl.
Geliang Tang (2):
selftests/bpf: Add mptcp pm_nl_ctl link
Squash to "selftests/bpf: Add mptcp subflow subtest"
MAINTAINERS | 1 +
tools/testing/selftests/bpf/Makefile | 3 ++-
tools/testing/selftests/bpf/mptcp_pm_nl_ctl.c | 1 +
tools/testing/selftests/bpf/prog_tests/mptcp.c | 17 ++++++-----------
4 files changed, 10 insertions(+), 12 deletions(-)
create mode 120000 tools/testing/selftests/bpf/mptcp_pm_nl_ctl.c
--
2.43.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH mptcp-next v6 1/2] selftests/bpf: Add mptcp pm_nl_ctl link
2024-05-15 10:38 [PATCH mptcp-next v6 0/2] patches for new MPTCP subflow subtest Geliang Tang
@ 2024-05-15 10:38 ` Geliang Tang
2024-05-15 10:38 ` [PATCH mptcp-next v6 2/2] Squash to "selftests/bpf: Add mptcp subflow subtest" Geliang Tang
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Geliang Tang @ 2024-05-15 10:38 UTC (permalink / raw)
To: mptcp; +Cc: Geliang Tang
From: Geliang Tang <tanggeliang@kylinos.cn>
This patch adds a link of mptcp pm_nl_ctl tool into bpf selftests, and
updates Makefile to compile it.
This is useful to run mptcp bpf selftests on a system with an old version
of IPRoite2 is installed. When 'ip mptcp' is not supported, this tool
pm_nl_ctl can be used instead.
MAINTAINERS needs to be updated since a new file is added.
Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
---
MAINTAINERS | 1 +
tools/testing/selftests/bpf/Makefile | 3 ++-
tools/testing/selftests/bpf/mptcp_pm_nl_ctl.c | 1 +
3 files changed, 4 insertions(+), 1 deletion(-)
create mode 120000 tools/testing/selftests/bpf/mptcp_pm_nl_ctl.c
diff --git a/MAINTAINERS b/MAINTAINERS
index 504def176aab..86cf39b2be13 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -15514,6 +15514,7 @@ F: include/trace/events/mptcp.h
F: include/uapi/linux/mptcp*.h
F: net/mptcp/
F: tools/testing/selftests/bpf/*/*mptcp*.[ch]
+F: tools/testing/selftests/bpf/*mptcp*.[ch]
F: tools/testing/selftests/net/mptcp/
NETWORKING [TCP]
diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
index e0b3887b3d2d..204269d0b5b8 100644
--- a/tools/testing/selftests/bpf/Makefile
+++ b/tools/testing/selftests/bpf/Makefile
@@ -144,7 +144,7 @@ TEST_GEN_PROGS_EXTENDED = test_skb_cgroup_id_user \
flow_dissector_load test_flow_dissector test_tcp_check_syncookie_user \
test_lirc_mode2_user xdping test_cpp runqslower bench bpf_testmod.ko \
xskxceiver xdp_redirect_multi xdp_synproxy veristat xdp_hw_metadata \
- xdp_features bpf_test_no_cfi.ko
+ xdp_features bpf_test_no_cfi.ko mptcp_pm_nl_ctl
TEST_GEN_FILES += liburandom_read.so urandom_read sign-file uprobe_multi
@@ -645,6 +645,7 @@ TRUNNER_EXTRA_FILES := $(OUTPUT)/urandom_read $(OUTPUT)/bpf_testmod.ko \
$(OUTPUT)/xdp_synproxy \
$(OUTPUT)/sign-file \
$(OUTPUT)/uprobe_multi \
+ $(OUTPUT)/mptcp_pm_nl_ctl \
ima_setup.sh \
verify_sig_setup.sh \
$(wildcard progs/btf_dump_test_case_*.c) \
diff --git a/tools/testing/selftests/bpf/mptcp_pm_nl_ctl.c b/tools/testing/selftests/bpf/mptcp_pm_nl_ctl.c
new file mode 120000
index 000000000000..5a08c255b278
--- /dev/null
+++ b/tools/testing/selftests/bpf/mptcp_pm_nl_ctl.c
@@ -0,0 +1 @@
+../net/mptcp/pm_nl_ctl.c
\ No newline at end of file
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH mptcp-next v6 2/2] Squash to "selftests/bpf: Add mptcp subflow subtest"
2024-05-15 10:38 [PATCH mptcp-next v6 0/2] patches for new MPTCP subflow subtest Geliang Tang
2024-05-15 10:38 ` [PATCH mptcp-next v6 1/2] selftests/bpf: Add mptcp pm_nl_ctl link Geliang Tang
@ 2024-05-15 10:38 ` Geliang Tang
2024-05-15 11:30 ` [PATCH mptcp-next v6 0/2] patches for new MPTCP subflow subtest MPTCP CI
2024-05-15 16:53 ` Matthieu Baerts
3 siblings, 0 replies; 5+ messages in thread
From: Geliang Tang @ 2024-05-15 10:38 UTC (permalink / raw)
To: mptcp; +Cc: Geliang Tang
From: Geliang Tang <tanggeliang@kylinos.cn>
Use pm_nl_ctl instead of 'ip mptcp'.
Use SYS_NOFAIL in _ss_search() and drop 'ss -M'.
Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
---
tools/testing/selftests/bpf/prog_tests/mptcp.c | 17 ++++++-----------
1 file changed, 6 insertions(+), 11 deletions(-)
diff --git a/tools/testing/selftests/bpf/prog_tests/mptcp.c b/tools/testing/selftests/bpf/prog_tests/mptcp.c
index 793b4b9c2bd2..4472aa404da0 100644
--- a/tools/testing/selftests/bpf/prog_tests/mptcp.c
+++ b/tools/testing/selftests/bpf/prog_tests/mptcp.c
@@ -362,7 +362,10 @@ 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);
- SYS(fail, "ip -net %s mptcp endpoint add %s %s", NS_TEST, ADDR_2, flags);
+ /* 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);
return 0;
fail:
@@ -371,16 +374,8 @@ static int endpoint_init(char *flags)
static int _ss_search(char *src, char *dst, char *port, char *keyword)
{
- char cmd[128];
- int n;
-
- n = snprintf(cmd, sizeof(cmd),
- "ip netns exec %s ss -Menita src %s dst %s %s %d | grep -q '%s'",
- NS_TEST, src, dst, port, PORT_1, keyword);
- if (n < 0 || n >= sizeof(cmd))
- return -1;
-
- return system(cmd);
+ return SYS_NOFAIL("ip netns exec %s ss -enita src %s dst %s %s %d | grep -q '%s'",
+ NS_TEST, src, dst, port, PORT_1, keyword);
}
static int ss_search(char *src, char *keyword)
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH mptcp-next v6 0/2] patches for new MPTCP subflow subtest
2024-05-15 10:38 [PATCH mptcp-next v6 0/2] patches for new MPTCP subflow subtest Geliang Tang
2024-05-15 10:38 ` [PATCH mptcp-next v6 1/2] selftests/bpf: Add mptcp pm_nl_ctl link Geliang Tang
2024-05-15 10:38 ` [PATCH mptcp-next v6 2/2] Squash to "selftests/bpf: Add mptcp subflow subtest" Geliang Tang
@ 2024-05-15 11:30 ` MPTCP CI
2024-05-15 16:53 ` Matthieu Baerts
3 siblings, 0 replies; 5+ messages in thread
From: MPTCP CI @ 2024-05-15 11:30 UTC (permalink / raw)
To: Geliang Tang; +Cc: mptcp
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/9094420496
Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/0c3b8e6998e9
Patchwork: https://patchwork.kernel.org/project/mptcp/list/?series=853374
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] 5+ messages in thread
* Re: [PATCH mptcp-next v6 0/2] patches for new MPTCP subflow subtest
2024-05-15 10:38 [PATCH mptcp-next v6 0/2] patches for new MPTCP subflow subtest Geliang Tang
` (2 preceding siblings ...)
2024-05-15 11:30 ` [PATCH mptcp-next v6 0/2] patches for new MPTCP subflow subtest MPTCP CI
@ 2024-05-15 16:53 ` Matthieu Baerts
3 siblings, 0 replies; 5+ messages in thread
From: Matthieu Baerts @ 2024-05-15 16:53 UTC (permalink / raw)
To: Geliang Tang, mptcp; +Cc: Geliang Tang
Hi Geliang,
On 15/05/2024 12:38, Geliang Tang wrote:
> From: Geliang Tang <tanggeliang@kylinos.cn>
>
> v6:
> - fix CI errors.
> - rebased.
Thank you for the new version!
Now in our tree (feat. for other trees)
New patches for t/upstream:
- 998f0e3afd37: selftests/bpf: Add mptcp pm_nl_ctl link
- 4de3c65cee0e: conflict in t/selftests-bpf-add-bpf_first-scheduler
- a8623b952f92: "squashed" in "selftests/bpf: Add mptcp subflow subtest"
- Results: 767563eb7a1b..f2eb0deee073 (export)
Tests are now in progress:
- export:
https://github.com/multipath-tcp/mptcp_net-next/commit/13f8e005192ea21bc58a860423a5289e141e0971/checks
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-05-15 16:53 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-15 10:38 [PATCH mptcp-next v6 0/2] patches for new MPTCP subflow subtest Geliang Tang
2024-05-15 10:38 ` [PATCH mptcp-next v6 1/2] selftests/bpf: Add mptcp pm_nl_ctl link Geliang Tang
2024-05-15 10:38 ` [PATCH mptcp-next v6 2/2] Squash to "selftests/bpf: Add mptcp subflow subtest" Geliang Tang
2024-05-15 11:30 ` [PATCH mptcp-next v6 0/2] patches for new MPTCP subflow subtest MPTCP CI
2024-05-15 16:53 ` Matthieu Baerts
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox