Message ID | 20230319203014.55866-2-alexei.starovoitov@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | bb4a6a9237293346cf1b3b7bc4ff4dfc1977a103 |
Delegated to: | BPF |
Headers | show |
Series | [bpf-next,1/2] libbpf: Fix ld_imm64 copy logic for ksym in light skeleton. | expand |
diff --git a/tools/testing/selftests/bpf/progs/test_ksyms_weak.c b/tools/testing/selftests/bpf/progs/test_ksyms_weak.c index 5f8379aadb29..7003eef0c192 100644 --- a/tools/testing/selftests/bpf/progs/test_ksyms_weak.c +++ b/tools/testing/selftests/bpf/progs/test_ksyms_weak.c @@ -37,7 +37,7 @@ int pass_handler(const void *ctx) /* tests existing symbols. */ rq = (struct rq *)bpf_per_cpu_ptr(&runqueues, 0); - if (rq) + if (rq && bpf_ksym_exists(&runqueues)) out__existing_typed = rq->cpu; out__existing_typeless = (__u64)&bpf_prog_active;