BPF List
 help / color / mirror / Atom feed
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: Check bpftool batch map dump contents
Date: Sun, 06 Sep 2026 17:16:20 +0000	[thread overview]
Message-ID: <20260906171621.48F901F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260906170819.1212661-3-hi@tychen.cc>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Multi-line comment does not follow the required BPF subsystem style.
--

commit c56ab936d02afbcb53a4b6f2e304647318354a05
Author: Tianyi Chen <hi@tychen.cc>

selftests/bpf: Check bpftool batch map dump contents

This commit adds selftests to exercise bpftool hash map dumps using batches.
It compares the unordered key/value results against expected inputs in plain,
JSON, and pretty JSON formats.

> diff --git a/tools/testing/selftests/bpf/prog_tests/bpftool_map_batch.c b/tools/testing/selftests/bpf/prog_tests/bpftool_map_batch.c
> new file mode 100644
> index 0000000000000..139d13a49dcef
> --- /dev/null
> +++ b/tools/testing/selftests/bpf/prog_tests/bpftool_map_batch.c

[ ... ]

> +static void check_dump(const struct dump_case *test, __u32 id, bool json, bool pretty)
> +{

[ ... ]

> +	err = get_bpftool_command_output(command, output, OUTPUT_SIZE);
> +	if (!ASSERT_OK(err, "map_dump"))
> +		goto out;
> +	/* Ignore presentation whitespace, but compare complete records and all
> +	 * punctuation. Expected contents come only from the input data, never
> +	 * from another map walk or bpftool invocation.
> +	 */

[Severity: Low]
Could we update this multi-line comment in check_dump() to follow the
preferred BPF subsystem style where the opening /* is placed on its own line?

> +	for (src = output, dst = output; *src; src++)
> +		if (!isspace((unsigned char)*src))
> +			*dst++ = *src;
> +	*dst = '\0';

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260906170819.1212661-1-hi@tychen.cc?part=2

  reply	other threads:[~2026-09-06 17:16 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-06 17:08 [PATCH bpf-next 0/2] bpftool: Batch bounded hash map dumps Tianyi Chen
2026-09-06 17:08 ` [PATCH bpf-next 1/2] bpftool: Use batch lookups for " Tianyi Chen
2026-09-06 17:20   ` sashiko-bot
2026-09-06 18:17   ` bot+bpf-ci
2026-09-06 17:08 ` [PATCH bpf-next 2/2] selftests/bpf: Check bpftool batch map dump contents Tianyi Chen
2026-09-06 17:16   ` sashiko-bot [this message]
2026-09-06 18:01   ` bot+bpf-ci
2026-09-07  1:21     ` Tianyi Chen
2026-09-07  1:21 ` [PATCH bpf-next v2 0/2] bpftool: Batch bounded hash map dumps Tianyi Chen
2026-09-07  1:21   ` [PATCH bpf-next v2 1/2] bpftool: Use batch lookups for " Tianyi Chen
2026-09-07  2:21     ` bot+bpf-ci
2026-09-07  5:15       ` Tianyi Chen
2026-09-07  1:21   ` [PATCH bpf-next v2 2/2] selftests/bpf: Check bpftool batch map dump contents Tianyi Chen
2026-09-07  2:21     ` bot+bpf-ci
2026-09-07  5:15       ` 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=20260906171621.48F901F00A3A@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox