All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH mptcp-next] Squash to "selftests/bpf: Add bpf_first scheduler & test" 2
@ 2024-04-18  1:36 Geliang Tang
  2024-04-18 16:44 ` Mat Martineau
  2024-04-18 16:52 ` MPTCP CI
  0 siblings, 2 replies; 3+ messages in thread
From: Geliang Tang @ 2024-04-18  1:36 UTC (permalink / raw)
  To: mptcp; +Cc: Geliang Tang

From: Geliang Tang <tanggeliang@kylinos.cn>

Check the string length of sched as Mat suggested.

Please insert this patch into "refactor mptcp bpf tests" v9 as the
last commit.

Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
---
 tools/testing/selftests/bpf/prog_tests/mptcp.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tools/testing/selftests/bpf/prog_tests/mptcp.c b/tools/testing/selftests/bpf/prog_tests/mptcp.c
index 9f17453b2d59..56dca35f289d 100644
--- a/tools/testing/selftests/bpf/prog_tests/mptcp.c
+++ b/tools/testing/selftests/bpf/prog_tests/mptcp.c
@@ -509,6 +509,10 @@ static void test_bpf_sched(struct bpf_object *obj, char *sched,
 	struct bpf_link *link;
 	struct bpf_map *map;
 
+	if (!ASSERT_LT(strlen(bpf_sched) + strlen(sched),
+		       MPTCP_SCHED_NAME_MAX, "too long string"))
+		return;
+
 	map = bpf_object__find_map_by_name(obj, sched);
 	link = bpf_map__attach_struct_ops(map);
 	if (CHECK(!link, sched, "attach_struct_ops: %d\n", errno))
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH mptcp-next] Squash to "selftests/bpf: Add bpf_first scheduler & test" 2
  2024-04-18  1:36 [PATCH mptcp-next] Squash to "selftests/bpf: Add bpf_first scheduler & test" 2 Geliang Tang
@ 2024-04-18 16:44 ` Mat Martineau
  2024-04-18 16:52 ` MPTCP CI
  1 sibling, 0 replies; 3+ messages in thread
From: Mat Martineau @ 2024-04-18 16:44 UTC (permalink / raw)
  To: Geliang Tang, Matthieu Baerts; +Cc: mptcp, Geliang Tang

On Thu, 18 Apr 2024, Geliang Tang wrote:

> From: Geliang Tang <tanggeliang@kylinos.cn>
>
> Check the string length of sched as Mat suggested.
>
> Please insert this patch into "refactor mptcp bpf tests" v9 as the
> last commit.
>
> Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
> ---
> tools/testing/selftests/bpf/prog_tests/mptcp.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/tools/testing/selftests/bpf/prog_tests/mptcp.c b/tools/testing/selftests/bpf/prog_tests/mptcp.c
> index 9f17453b2d59..56dca35f289d 100644
> --- a/tools/testing/selftests/bpf/prog_tests/mptcp.c
> +++ b/tools/testing/selftests/bpf/prog_tests/mptcp.c
> @@ -509,6 +509,10 @@ static void test_bpf_sched(struct bpf_object *obj, char *sched,
> 	struct bpf_link *link;
> 	struct bpf_map *map;
>
> +	if (!ASSERT_LT(strlen(bpf_sched) + strlen(sched),
> +		       MPTCP_SCHED_NAME_MAX, "too long string"))

Matthieu, could you change the above message to "Scheduler name too long" 
when applying?

Otherwise, looks good to squash with along with v9 of "refactor mptcp bpf 
tests", thank you!

- Mat



> +		return;
> +
> 	map = bpf_object__find_map_by_name(obj, sched);
> 	link = bpf_map__attach_struct_ops(map);
> 	if (CHECK(!link, sched, "attach_struct_ops: %d\n", errno))
> -- 
> 2.40.1
>
>
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH mptcp-next] Squash to "selftests/bpf: Add bpf_first scheduler & test" 2
  2024-04-18  1:36 [PATCH mptcp-next] Squash to "selftests/bpf: Add bpf_first scheduler & test" 2 Geliang Tang
  2024-04-18 16:44 ` Mat Martineau
@ 2024-04-18 16:52 ` MPTCP CI
  1 sibling, 0 replies; 3+ messages in thread
From: MPTCP CI @ 2024-04-18 16:52 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/8741315896

Initiator: Matthieu Baerts (NGI0)
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/0bda5a7699a6
Patchwork: https://patchwork.kernel.org/project/mptcp/list/?series=845641


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] 3+ messages in thread

end of thread, other threads:[~2024-04-18 16:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-18  1:36 [PATCH mptcp-next] Squash to "selftests/bpf: Add bpf_first scheduler & test" 2 Geliang Tang
2024-04-18 16:44 ` Mat Martineau
2024-04-18 16:52 ` MPTCP CI

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.