File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
tools/testing/selftests/bpf/prog_tests Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ static __u64 kallsyms_find(const char *sym)
3232
3333void test_ksyms (void )
3434{
35+ __u64 per_cpu_start_addr = kallsyms_find ("__per_cpu_start" );
3536 __u64 link_fops_addr = kallsyms_find ("bpf_link_fops" );
3637 const char * btf_path = "/sys/kernel/btf/vmlinux" ;
3738 struct test_ksyms * skel ;
@@ -63,8 +64,9 @@ void test_ksyms(void)
6364 "got %llu, exp %llu\n" , data -> out__bpf_link_fops1 , (__u64 )0 );
6465 CHECK (data -> out__btf_size != btf_size , "btf_size" ,
6566 "got %llu, exp %llu\n" , data -> out__btf_size , btf_size );
66- CHECK (data -> out__per_cpu_start != 0 , "__per_cpu_start" ,
67- "got %llu, exp %llu\n" , data -> out__per_cpu_start , (__u64 )0 );
67+ CHECK (data -> out__per_cpu_start != per_cpu_start_addr , "__per_cpu_start" ,
68+ "got %llu, exp %llu\n" , data -> out__per_cpu_start ,
69+ per_cpu_start_addr );
6870
6971cleanup :
7072 test_ksyms__destroy (skel );
You can’t perform that action at this time.
0 commit comments