]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests/bpf: Tolerate BPF and skeleton generation failures
authorRicardo B. Marlière <rbm@suse.com>
Tue, 2 Jun 2026 13:02:52 +0000 (10:02 -0300)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 5 Jun 2026 21:20:58 +0000 (14:20 -0700)
commitc476bdf27657c6ea4a447c18de169c7bdcdd419d
treef46ed7d26dfa8a2fbbff5b316fe2743f48727503
parent9779193e871b144e34ec4a3e50109b3778a51a69
selftests/bpf: Tolerate BPF and skeleton generation failures

Some BPF programs cannot be built on distro kernels because required BTF
types or features are missing. A single failure currently aborts the
selftests/bpf build.

Make BPF object and skeleton generation best effort in permissive mode:
emit SKIP-BPF or SKIP-SKEL to stderr, remove failed outputs so downstream
rules can detect absence, and continue with remaining tests. Apply the same
tolerance to linked skeletons (TRUNNER_BPF_SKELS_LINKED), which depend on
multiple .bpf.o files and abort the build when any dependency is missing.

Note that progress messages (GEN-SKEL, LINK-BPF) are also redirected to
stderr as a side effect of rewriting the recipes into single-shell
pipelines; the $(call msg,...) macro is a make-recipe construct that cannot
be used inside an &&-chained shell command sequence.

Signed-off-by: Ricardo B. Marlière <rbm@suse.com>
Link: https://lore.kernel.org/r/20260602-selftests-bpf_misconfig-v12-3-27f898b3ba26@suse.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/Makefile