> In test_global_percpu_data.c, dump_percpu_data is defined after two
> non-autoload SEC("?kprobe") programs (verifier_strncmp and
> verifier_snprintf). If bpftool does not skip non-autoload programs when
> generating light skeletons, dump_percpu_data.prog_fd is left invalid or
> unpopulated.
>
> Factor out a test_global_percpu_data_iter_fd() helper that operates
> directly on prog/map file descriptors, and add an iter_lskel subtest to
> verify that dump_percpu_data is properly loaded and executes correctly
> when using the light skeleton.
>
> Fixes: 4c9241bd731a ("selftests/bpf: Add tests to verify global percpu data")
> Fixes: 1ed2294b31fc ("selftests/bpf: Test verifier log for global percpu
> data")
> Signed-off-by: Thiébaud Weksteen <[email protected]>
Are the Fixes: tags appropriate for this commit? This patch only adds new
test coverage (a new iter_lskel subtest) and refactors existing test code
(factoring out test_global_percpu_data_iter_fd() with no behavioral change
to the existing "iter" subtest). It doesn't fix anything that
4c9241bd731a or 1ed2294b31fc got wrong.
The bug being tested is in bpftool, introduced by d510296d331a
("bpftool: Use syscall/loader program in "prog load" and "gen skeleton"
command.") and actually fixed by the two preceding patches in this series
(202ee90dee368 and 843762e6f4665), both of which already carry the correct
Fixes: d510296d331a tag.
There's also a backport concern. The Fixes: tags make this patch a
candidate for AUTOSEL/stable pickup independently of 202ee90dee368 and
843762e6f4665. Since this is the last patch of the series, backporting it
alone would land the new iter_lskel subtest in a tree with the unfixed
bpftool, where skel->progs.dump_percpu_data.prog_fd is left at 0 and
bpf_link_create(0, 0, BPF_TRACE_ITER, &opts) fails. The subtest would fail
by construction.
Should the Fixes: tags be removed, or if they're intended to be kept,
should the dependency on the two bpftool patches be stated via
Cc: <[email protected]> prerequisite lines?
---
AI reviewed your patch. Please fix the bug or email reply why it's not a bug.
See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md
CI run summary: https://github.com/kernel-patches/bpf/actions/runs/35306404663