BPF List
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Kumar Kartikeya Dwivedi" <memxor@gmail.com>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH bpf-next v2 6/9] selftests/bpf: Add JIT-sequence tests for __arena kfunc arguments
Date: Sun, 26 Jul 2026 01:44:01 +0000	[thread overview]
Message-ID: <20260726014402.23E3F1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260726013105.3689867-7-memxor@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Missing test dependency check for `bpf_testmod.ko` in `test_arena_kfunc_jit()`.
--

--- Patch [6]: [PATCH bpf-next v2 6/9] selftests/bpf: Add JIT-sequence tests for __arena kfunc arguments ---
commit 127efe77c3180fef987aeb8dfccbc04666cf9935
Author: Tejun Heo <tj@kernel.org>

selftests/bpf: Add JIT-sequence tests for __arena kfunc arguments

This commit adds JIT-sequence tests for __arena and __arena_nullable
kfunc arguments on x86-64. It pins the exact rebase sequences the JITs
emit to verify correct code generation.

> diff --git a/tools/testing/selftests/bpf/prog_tests/arena_kfunc_jit.c b/tools/testing/selftests/bpf/prog_tests/arena_kfunc_jit.c
> new file mode 100644
> index 0000000000000..2359cde24c45d
> --- /dev/null
> +++ b/tools/testing/selftests/bpf/prog_tests/arena_kfunc_jit.c
> @@ -0,0 +1,13 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/* Copyright (c) 2026 Meta Platforms, Inc. and affiliates. */
> +#include <test_progs.h>
> +#include "arena_kfunc_jit.skel.h"
> +
> +/*
> + * Runs with full capabilities: resolving module kfunc ksyms requires
> + * CAP_SYS_ADMIN, which rules out the capability-restricted runner.
> + */
> +void test_arena_kfunc_jit(void)
> +{
> +	RUN_TESTS(arena_kfunc_jit);
> +}

[Severity: Medium]
Since this test relies on kfuncs from bpf_testmod, should there be a check
for env.has_testmod before running the tests?

If the tests are run in an environment where bpf_testmod cannot be loaded,
this will fail with a verifier kfunc resolution error instead of skipping
gracefully.

For example, adding:

    if (!env.has_testmod) {
        test__skip();
        return;
    }

would allow the test runner to skip gracefully.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260726013105.3689867-1-memxor@gmail.com?part=6

  reply	other threads:[~2026-07-26  1:44 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-26  1:30 [PATCH bpf-next v2 0/9] Add arena argument support to kfuncs and struct_ops Kumar Kartikeya Dwivedi
2026-07-26  1:30 ` [PATCH bpf-next v2 1/9] bpf: Support __arena and __arena_nullable kfunc argument suffixes Kumar Kartikeya Dwivedi
2026-07-26  1:47   ` sashiko-bot
2026-07-26  2:01     ` Kumar Kartikeya Dwivedi
2026-07-26  1:30 ` [PATCH bpf-next v2 2/9] bpf: Support __arena and __arena_nullable on struct_ops arguments Kumar Kartikeya Dwivedi
2026-07-26  1:30 ` [PATCH bpf-next v2 3/9] bpf, x86: JIT __arena kfunc argument rebasing Kumar Kartikeya Dwivedi
2026-07-26  2:22   ` bot+bpf-ci
2026-07-26  2:25     ` Kumar Kartikeya Dwivedi
2026-07-26  1:30 ` [PATCH bpf-next v2 4/9] bpf, x86: Convert struct_ops arena arguments in the trampoline Kumar Kartikeya Dwivedi
2026-07-26  1:30 ` [PATCH bpf-next v2 5/9] selftests/bpf: Add kfunc __arena and __arena_nullable argument tests Kumar Kartikeya Dwivedi
2026-07-26  1:41   ` sashiko-bot
2026-07-26  2:02     ` Kumar Kartikeya Dwivedi
2026-07-26  1:30 ` [PATCH bpf-next v2 6/9] selftests/bpf: Add JIT-sequence tests for __arena kfunc arguments Kumar Kartikeya Dwivedi
2026-07-26  1:44   ` sashiko-bot [this message]
2026-07-26  1:31 ` [PATCH bpf-next v2 7/9] selftests/bpf: Add struct_ops __arena and __arena_nullable argument tests Kumar Kartikeya Dwivedi
2026-07-26  1:31 ` [PATCH bpf-next v2 8/9] bpf, x86: Fix stack-passed arguments for indirect trampolines Kumar Kartikeya Dwivedi
2026-07-26  1:51   ` sashiko-bot
2026-07-26  2:05     ` Kumar Kartikeya Dwivedi
2026-07-26  1:31 ` [PATCH bpf-next v2 9/9] selftests/bpf: Test stack-passed struct_ops arena arguments Kumar Kartikeya Dwivedi

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=20260726014402.23E3F1F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=memxor@gmail.com \
    --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