Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests/bpf: Revert CO-RE removal in test_ksyms_weak.

The commit 087cba799ced ("selftests/bpf: Add weak/typeless ksym test for light skeleton")
added test_ksyms_weak to light skeleton testing, but remove CO-RE access.
Revert that part of commit, since light skeleton can use CO-RE in the kernel.

Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20211201181040.23337-17-alexei.starovoitov@gmail.com

authored by

Alexei Starovoitov and committed by
Andrii Nakryiko
3268f031 26b367e3

+1 -1
+1 -1
tools/testing/selftests/bpf/progs/test_ksyms_weak.c
··· 38 38 /* tests existing symbols. */ 39 39 rq = (struct rq *)bpf_per_cpu_ptr(&runqueues, 0); 40 40 if (rq) 41 - out__existing_typed = 0; 41 + out__existing_typed = rq->cpu; 42 42 out__existing_typeless = (__u64)&bpf_prog_active; 43 43 44 44 /* tests non-existent symbols. */