Skip to content

Commit bb4a6a9

Browse files
Alexei Starovoitovanakryiko
authored andcommitted
selftest/bpf: Add a test case for ld_imm64 copy logic.
Add a test case to exercise {btf_id, btf_obj_fd} copy logic between ld_imm64 insns. Signed-off-by: Alexei Starovoitov <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
1 parent a506d6c commit bb4a6a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/testing/selftests/bpf/progs/test_ksyms_weak.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ int pass_handler(const void *ctx)
3737

3838
/* tests existing symbols. */
3939
rq = (struct rq *)bpf_per_cpu_ptr(&runqueues, 0);
40-
if (rq)
40+
if (rq && bpf_ksym_exists(&runqueues))
4141
out__existing_typed = rq->cpu;
4242
out__existing_typeless = (__u64)&bpf_prog_active;
4343

0 commit comments

Comments
 (0)