From: sashiko-bot@kernel.org
To: "Hui Su" <sh_def@163.com>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH bpf 2/3] selftests/bpf: Test querying BPF_F_PREORDER cgroup attachments
Date: Fri, 18 Sep 2026 17:33:34 +0000 [thread overview]
Message-ID: <20260918173335.1AC791F00898@smtp.kernel.org> (raw)
In-Reply-To: <20260918172407.3459188-3-sh_def@163.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] bpf: multi-line comment style violation in selftests
--
commit 3e88ee3f08c0b0faed466f91d62f7c6939ba9fa3
Author: Hui Su <sh_def@163.com>
selftests/bpf: Test querying BPF_F_PREORDER cgroup attachments
Extend cgroup_mprog_opts selftests to verify that BPF_PROG_QUERY reports
BPF_F_PREORDER in prog_attach_flags for both direct program and link
attachments.
> diff --git a/tools/testing/selftests/bpf/prog_tests/cgroup_mprog_opts.c b/tools/testing/selftests/bpf/prog_tests/cgroup_mprog_opts.c
> index bb60704a3ef92..343357d9c460e 100644
> --- a/tools/testing/selftests/bpf/prog_tests/cgroup_mprog_opts.c
> +++ b/tools/testing/selftests/bpf/prog_tests/cgroup_mprog_opts.c
[ ... ]
> @@ -357,6 +380,34 @@ static void test_preorder_prog_attach_detach(int atype)
>
> assert_mprog_count(cg, atype, 4);
>
> + optq.prog_ids = prog_ids;
> + optq.prog_attach_flags = prog_attach_flags;
> + optq.count = 10;
> + err = bpf_prog_query_opts(cg, atype, &optq);
> + if (!ASSERT_OK(err, "prog_query"))
> + goto cleanup4;
> +
> + ASSERT_EQ(optq.count, 4, "count");
> + /* Direct query reports attached programs in cgroup list order.
> + * Lookup by prog_id to verify per-program flags independently of slot index.
> + */
[Severity: Low]
In tools/testing/selftests/bpf/prog_tests/cgroup_mprog_opts.c within
test_preorder_prog_attach_detach(), does this multi-line comment violate the
BPF subsystem style guide? The guidelines require the opening /* to be on its
own line.
> + err = find_prog_attach_flags(&optq, id1, &flags);
> + if (ASSERT_OK(err, "find id1"))
> + ASSERT_EQ(flags, BPF_F_ALLOW_MULTI, "flags id1");
[ ... ]
> @@ -460,6 +520,34 @@ static void test_preorder_link_attach_detach(int atype)
>
> assert_mprog_count(cg, atype, 4);
>
> + optq.prog_ids = prog_ids;
> + optq.prog_attach_flags = prog_attach_flags;
> + optq.count = 10;
> + err = bpf_prog_query_opts(cg, atype, &optq);
> + if (!ASSERT_OK(err, "prog_query"))
> + goto cleanup4;
> +
> + ASSERT_EQ(optq.count, 4, "count");
> + /* Direct query reports attached programs in cgroup list order.
> + * Lookup by prog_id to verify per-program flags independently of slot index.
> + */
[Severity: Low]
Could this comment block in test_preorder_link_attach_detach() be updated to
match the required BPF multi-line comment format? The opening /* should be
placed on a separate line.
> + err = find_prog_attach_flags(&optq, id1, &flags);
> + if (ASSERT_OK(err, "find id1"))
> + ASSERT_EQ(flags, BPF_F_ALLOW_MULTI, "flags id1");
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260918172407.3459188-1-sh_def@163.com?part=2
next prev parent reply other threads:[~2026-09-18 17:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-18 17:24 [PATCH bpf 0/3] bpf: expose cgroup preorder attachment state to userspace Hui Su
2026-09-18 17:24 ` [PATCH bpf 1/3] bpf: Report BPF_F_PREORDER in cgroup program queries Hui Su
2026-09-18 17:51 ` Alexei Starovoitov
2026-09-18 18:23 ` bot+bpf-ci
2026-09-18 17:24 ` [PATCH bpf 2/3] selftests/bpf: Test querying BPF_F_PREORDER cgroup attachments Hui Su
2026-09-18 17:33 ` sashiko-bot [this message]
2026-09-18 18:23 ` bot+bpf-ci
2026-09-18 17:24 ` [PATCH bpf 3/3] bpftool: Add support for BPF_F_PREORDER cgroup attach flag Hui Su
2026-09-18 18:23 ` bot+bpf-ci
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260918173335.1AC791F00898@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=sh_def@163.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox