From: sashiko-bot@kernel.org
To: "Tianyi Chen" <hi@tychen.cc>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH bpf-next 2/2] selftests/bpf: Cover bpftool ring buffer event_pipe
Date: Sun, 06 Sep 2026 17:18:07 +0000 [thread overview]
Message-ID: <20260906171808.5B5121F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260906170747.1212378-3-hi@tychen.cc>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] The commit message claims to test 'pinned map selection', but it is never implemented or exercised in the test code.
- [Medium] The commit message claims to check 'pretty JSON output', but the test never invokes bpftool with the pretty print flag.
--
commit 7060e09603777e15c3fff0503b5038d8629bb63d
Author: Tianyi Chen <hi@tychen.cc>
selftests/bpf: Cover bpftool ring buffer event_pipe
This commit adds selftests for bpftool's ring buffer and perf event pipe
output. It aims to verify plain, JSON, and pretty JSON output formats, as
well as map selection methods and error handling.
> diff --git a/tools/testing/selftests/bpf/prog_tests/bpftool_ringbuf.c b/tools/testing/selftests/bpf/prog_tests/bpftool_ringbuf.c
> new file mode 100644
> index 0000000000000..2099bf1020930
> --- /dev/null
> +++ b/tools/testing/selftests/bpf/prog_tests/bpftool_ringbuf.c
[ ... ]
> @@ -0,0 +1,381 @@
[ ... ]
> +static bool consumer_start(struct consumer *child, int map_fd, bool json,
> + const char *option, bool pair, bool capture_errors)
> +{
> + struct bpf_map_info info = {};
> + __u32 len = sizeof(info);
> + const char *path = bpftool_path();
> + char *argv[12], id[16];
> + int out[2], ready[2], n = 0, err, err_fd;
> + struct pollfd pfd;
> +
> + if (!ASSERT_OK_PTR(path, "bpftool path (set BPFTOOL to override)") ||
> + !ASSERT_OK(bpf_map_get_info_by_fd(map_fd, &info, &len), "map info"))
> + return false;
> + snprintf(id, sizeof(id), "%u", info.id);
> + argv[n++] = (char *)path;
> + if (json)
> + argv[n++] = "-j";
[Severity: Medium]
The commit message states the test will check "complete plain, JSON and
pretty JSON output", but in consumer_start() the test only ever appends the
"-j" flag.
Is there a missing test case or flag assignment here to exercise the "-p"
(pretty JSON) bpftool output path as promised?
> + argv[n++] = "map";
> + argv[n++] = "event_pipe";
> + argv[n++] = "id";
> + argv[n++] = id;
[Severity: Medium]
The commit message claims to "Exercise ID and pinned map selection", but
consumer_start() hardcodes "id" for the map selection argument.
Is the logic to use "pinned" paths missing from this test implementation?
> + if (option) {
> + argv[n++] = (char *)option;
> + argv[n++] = "0";
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260906170747.1212378-1-hi@tychen.cc?part=2
next prev parent reply other threads:[~2026-09-06 17:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-06 17:07 [PATCH bpf-next 0/2] bpftool: Consume ring buffer maps with event_pipe Tianyi Chen
2026-09-06 17:07 ` [PATCH bpf-next 1/2] bpftool: Read " Tianyi Chen
2026-09-06 17:07 ` [PATCH bpf-next 2/2] selftests/bpf: Cover bpftool ring buffer event_pipe Tianyi Chen
2026-09-06 17:18 ` sashiko-bot [this message]
2026-09-07 1:21 ` [PATCH bpf-next v2 0/2] bpftool: Consume ring buffer maps with event_pipe Tianyi Chen
2026-09-07 1:21 ` [PATCH bpf-next v2 1/2] bpftool: Read " Tianyi Chen
2026-09-07 2:20 ` bot+bpf-ci
2026-09-07 5:15 ` Tianyi Chen
2026-09-07 1:21 ` [PATCH bpf-next v2 2/2] selftests/bpf: Cover bpftool ring buffer event_pipe Tianyi Chen
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=20260906171808.5B5121F00A3A@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=hi@tychen.cc \
--cc=sashiko-reviews@lists.linux.dev \
/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 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.