Re: [PATCH bpf-next v3 6/9] selftests/bpf: Add JIT-sequence tests for __arena kfunc arguments
[email protected] Mon, 03 Aug 2026 13:35:21 +0000
| Newsgroups | org.kernel.vger.bpf |
|---|---|
| Message-ID | <[email protected]> |
Thank you for your contribution! Sashiko AI review found 1 potential issue(= s) to consider: - [Medium] Missing `env.has_testmod` check can cause test failures when `bp= f_testmod.ko` is not loaded. -- --- Patch [6]: [PATCH bpf-next v3 6/9] selftests/bpf: Add JIT-sequence test= s for __arena kfunc arguments --- commit 9c67c6873243ff0c5bbb155714a37d780a229111 Author: Tejun Heo <[email protected]> selftests/bpf: Add JIT-sequence tests for __arena kfunc arguments This commit pins the exact rebase sequences the JITs emit for __arena and __arena_nullable kfunc arguments with __jited assertions on x86-64. > diff --git a/tools/testing/selftests/bpf/prog_tests/arena_kfunc_jit.c b/t= ools/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] Will this cause test failures in environments where bpf_testmod.ko is not loaded? Since the loaded BPF programs depend on kfuncs (e.g., bpf_kfunc_arena_cap_test) from bpf_testmod.ko, if the module is absent, kfu= nc resolution fails and causes program load failures. Because the programs are annotated with __success, test_loader will record these as test failures instead of skipping them. Should there be an env.has_testmod check before calling RUN_TESTS() to skip the test cleanly? > +} --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20260803125115.2264= [email protected]?part=3D6