On Fri Sep 11, 2026 at 11:16 AM -03, HyeongJun An wrote:
> The Makefile documents BPF_STRICT_BUILD=0 as tolerating any BPF object,
> skeleton, test object or benchmark failure so that the remaining tests
> still build. Every skeleton rule honours that through
> $(if $(PERMISSIVE),...), except the three that build the libarena
> skeletons. Those invoke a sub-make with no guard, so a libarena failure
> is fatal even in permissive mode.
>
> With a libarena source that fails to compile, BPF_STRICT_BUILD=0 stops at
Under which circumstances does this happen to you? I missed this because I
was using defconfig + DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT + DEBUG_INFO_BTF +
BPF_SYSCALL + BPF_JIT
>
> make: *** [libarena/libarena.skel.h] Error 2
>
> while an ordinary program failing the same way prints SKIP-BPF and the
> build carries on.
>
> Guard the three sub-makes the way the other skeleton rules are guarded.
> The build then prints SKIP-SKEL and continues, and test_progs,
> test_progs-no_alu32, test_progs-cpuv4 and bench all link. Nothing
> downstream needs a change, because the missing skeleton drops out through
> the existing permissive paths and libarena.test.o is reported as
> SKIP-TEST. The default BPF_STRICT_BUILD=1 still fails on the same input.
>
> Fixes: a6850fa388f6 ("selftests/bpf: Add BPF_STRICT_BUILD toggle")
Acked-by: Ricardo B. Marlière (SUSE) <[email protected]>
> Signed-off-by: HyeongJun An <[email protected]>
> Assisted-by: Claude:claude-opus-5
> ---
> tools/testing/selftests/bpf/Makefile | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/tools/testing/selftests/bpf/Makefile
> b/tools/testing/selftests/bpf/Makefile
> index 7ea5ba1df29e..a9951774e5c8 100644
> --- a/tools/testing/selftests/bpf/Makefile
> +++ b/tools/testing/selftests/bpf/Makefile
> @@ -835,17 +835,20 @@ LIBARENA_SKEL := libarena/libarena.skel.h
> LIBARENA_BENCH_SKEL := libarena/libarena_bench.skel.h
>
> $(LIBARENA_SKEL): $(INCLUDE_DIR)/vmlinux.h $(BPFOBJ) $(LIBARENA_BPF_DEPS)
> - +$(MAKE) -C libarena libarena.skel.h $(LIBARENA_MAKE_ARGS)
> + +$(MAKE) -C libarena libarena.skel.h $(LIBARENA_MAKE_ARGS) $(if
> $(PERMISSIVE),|| \
> + printf ' %-12s %s\n' 'SKIP-SKEL' '$(notdir $@)' 1>&2)
>
> $(LIBARENA_BENCH_SKEL): $(INCLUDE_DIR)/vmlinux.h $(BPFOBJ)
> $(LIBARENA_BENCH_BPF_DEPS) | $(LIBARENA_SKEL)
> - +$(MAKE) -C libarena benchmarks $(LIBARENA_MAKE_ARGS)
> + +$(MAKE) -C libarena benchmarks $(LIBARENA_MAKE_ARGS) $(if
> $(PERMISSIVE),|| \
> + printf ' %-12s %s\n' 'SKIP-SKEL' '$(notdir $@)' 1>&2)
>
> ifneq ($(CLANG_HAS_ARENA_ASAN),)
> LIBARENA_ASAN_SKEL := libarena/libarena_asan.skel.h
> CFLAGS += -DHAS_BPF_ARENA_ASAN
>
> $(LIBARENA_ASAN_SKEL): $(INCLUDE_DIR)/vmlinux.h $(BPFOBJ)
> $(LIBARENA_BPF_DEPS)
> - +$(MAKE) -C libarena libarena_asan.skel.h $(LIBARENA_MAKE_ARGS)
> + +$(MAKE) -C libarena libarena_asan.skel.h $(LIBARENA_MAKE_ARGS) $(if
> $(PERMISSIVE),|| \
> + printf ' %-12s %s\n' 'SKIP-SKEL' '$(notdir $@)' 1>&2)
> endif
>
> # Define test_progs test runner.
>
> base-commit: af0b84a9215d951d16f26b7ee34353b970cf5d4e