All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Ramin Moussavi" <ramin.moussavi@yacoub.de>, bpf@vger.kernel.org
Subject: Re: [PATCH bpf-next 1/1] selftests/bpf: Check shift counts across operand register pairs
Date: Wed, 02 Dec 2026 22:21:59 +0000	[thread overview]
Message-ID: <sashiko-outbox-246688@kernel.org> (raw)
In-Reply-To: <20261202221801.3863568-2-ramin.moussavi@yacoub.de>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] selftests/bpf: non-standard multi-line comment style above
  batch_note()
--

commit f23b98c932cf4075dd7ccf4be0a85595080b26b9
Author: Ramin Moussavi <ramin.moussavi@yacoub.de>

selftests/bpf: Check shift counts across operand register pairs

This commit extends the shift_counts test in jit_insns to test out-of-range
and negative shift counts across all operand register pairs and adds a
per-case note field to distinguish register pairs in failure messages.

> diff --git a/tools/testing/selftests/bpf/prog_tests/jit_insns.c b/tools/testing/selftests/bpf/prog_tests/jit_insns.c
> index 0aaab23a2eef8..4d67e7db38a1b 100644
> --- a/tools/testing/selftests/bpf/prog_tests/jit_insns.c
> +++ b/tools/testing/selftests/bpf/prog_tests/jit_insns.c

[ ... ]

> @@ -124,10 +127,23 @@ static int batch_case(struct batch *b, int rc, __u64 in0, __u64 in1)
>  	b->ctx.in[k][0] = in0;
>  	b->ctx.in[k][1] = in1;
>  	b->nr_out[k] = 0;
> +	b->note[k][0] = 0;
>  	EMIT(b, BPF_LDX_MEM(BPF_DW, rc, BPF_REG_10, CTX_SPILL));
>  	return k;
>  }
>  
> +/* Name the case in its failure message, where the operands alone do not say
> + * which one it was
> + */
> +__printf(3, 4) static void batch_note(struct batch *b, int k, const char *fmt, ...)

[Severity: Low]
This isn't a bug, but BPF multi-line comment style puts the opening /* on
its own line with the comment text starting on the next line, matching the
comment above shift_count_pairs().

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261202221801.3863568-1-ramin.moussavi@yacoub.de?part=1

      reply	other threads:[~2026-12-02 22:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-02 22:18 [PATCH bpf-next 0/1] selftests/bpf: cover shift counts over all operand register pairs Ramin Moussavi
2026-12-02 22:18 ` [PATCH bpf-next 1/1] selftests/bpf: Check shift counts across " Ramin Moussavi
2026-12-02 22:21   ` sashiko-bot [this message]

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=sashiko-outbox-246688@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=ramin.moussavi@yacoub.de \
    --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.