Re: [PATCHSET SLOP RFC 4/6] selftests/bpf: Add struct_ops __arena argument tests
[email protected] Mon, 13 Jul 2026 02:55:36 +0000
| Newsgroups | dev.linux.lists.sched-ext,org.kernel.vger.bpf |
|---|---|
| Message-ID | <[email protected]> |
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] Multi-line comments in BPF-related code must have the opening `/*` on its own line. -- --- Patch [4]: [PATCHSET SLOP RFC 4/6] selftests/bpf: Add struct_ops __arena argument tests --- commit 9e21274b1ecab24a7e9f15aad54b02d04ae38d78 Author: Tejun Heo <[email protected]> selftests/bpf: Add struct_ops __arena argument tests This commit adds tests for struct_ops members with an __arena argument. It creates a callback, forwards an arena pointer through a kfunc, and verifies the read/write access as well as attach rejection for programs without an arena. > diff --git a/tools/testing/selftests/bpf/prog_tests/test_struct_ops_arena.c b/tools/testing/selftests/bpf/prog_tests/test_struct_ops_arena.c > new file mode 100644 > index 0000000000000..75a3a649060cf > --- /dev/null > +++ b/tools/testing/selftests/bpf/prog_tests/test_struct_ops_arena.c > @@ -0,0 +1,61 @@ > +// SPDX-License-Identifier: GPL-2.0 > +/* Copyright (c) 2026 Tejun Heo <[email protected]> */ > +#include <test_progs.h> > + > +#include "struct_ops_arena.skel.h" > +#include "struct_ops_arena_fail.skel.h" > + > +/* Attach a callback with an __arena argument and drive it through the > + * bpf_testmod_ops3_call_test_arena() kfunc. > + */ [Severity: Low] This isn't a bug, but the BPF subsystem prefers multi-line comments to have the opening /* on its own line. Should this be updated to match the modern kernel multi-line comment style? > +static void arena_arg(void) > +{ [ ... ] > + bpf_link__destroy(link); > + struct_ops_arena__destroy(skel); > +} > + > +/* A program with no arena cannot attach to a member with an __arena > + * argument. > + */ [Severity: Low] This isn't a bug, but similarly here, could the opening /* be placed on its own line to align with the subsystem's preferred comment style? > +static void arena_arg_fail(void) > +{ -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=4