From: Felix Maurer <fmaurer(a)redhat.com>
kernel.spec: package unstripped test_progs-no_alu32
Two bpf selftest run by test_progs-no_alu32 were failing:
./test_progs-no_alu32 -t attach_probe
[...]
libbpf: elf: failed to find symbol 'trigger_func2' in '/proc/self/exe'
test_attach_probe:FAIL:attach_uprobe_byname unexpected error: -2
[...]
./test_progs-no_alu32 -t uprobe_autoattach
[...]
libbpf: elf: failed to find symbol 'autoattach_trigger_func' in
'/proc/self/exe'
libbpf: prog 'handle_uprobe_byname': failed to auto-attach: -2
test_uprobe_autoattach:FAIL:skel_attach unexpected error: -2 (errno 2)
[...]
These selftests require symbols in the test binary to pass. We already ship
kselftests/bpf/test_progs unstripped. Package the no_alu32 variant of the
test binary unstripped as well.
Signed-off-by: Felix Maurer <fmaurer(a)redhat.com>
diff --git a/redhat/kernel.spec.template b/redhat/kernel.spec.template
index blahblah..blahblah 100644
--- a/redhat/kernel.spec.template
+++ b/redhat/kernel.spec.template
@@ -2579,6 +2579,7 @@ for dir in bpf bpf/no_alu32 bpf/progs; do
done
ln -sr %{buildroot}%{_libexecdir}/kselftests/bpf/bpftool
%{buildroot}%{_libexecdir}/kselftests/bpf/no_alu32/bpftool
%buildroot_save_unstripped "usr/libexec/kselftests/bpf/test_progs"
+%buildroot_save_unstripped "usr/libexec/kselftests/bpf/test_progs-no_alu32"
popd
export -n BPFTOOL
%endif
--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2422