From: Alexei Starovoitov Date: Wed, 1 Dec 2021 18:10:39 +0000 (-0800) Subject: selftests/bpf: Revert CO-RE removal in test_ksyms_weak. X-Git-Tag: v6.1-rc5~2306^2~228^2~20^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3268f0316af629474ec4fa8d9b4e6f618cb96794;p=platform%2Fkernel%2Flinux-starfive.git 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 Signed-off-by: Andrii Nakryiko Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20211201181040.23337-17-alexei.starovoitov@gmail.com --- diff --git a/tools/testing/selftests/bpf/progs/test_ksyms_weak.c b/tools/testing/selftests/bpf/progs/test_ksyms_weak.c index 8eadbd4..5f8379a 100644 --- a/tools/testing/selftests/bpf/progs/test_ksyms_weak.c +++ b/tools/testing/selftests/bpf/progs/test_ksyms_weak.c @@ -38,7 +38,7 @@ int pass_handler(const void *ctx) /* tests existing symbols. */ rq = (struct rq *)bpf_per_cpu_ptr(&runqueues, 0); if (rq) - out__existing_typed = 0; + out__existing_typed = rq->cpu; out__existing_typeless = (__u64)&bpf_prog_active; /* tests non-existent symbols. */