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)
32
32
33
33
void test_ksyms (void )
34
34
{
35
+ __u64 per_cpu_start_addr = kallsyms_find ("__per_cpu_start" );
35
36
__u64 link_fops_addr = kallsyms_find ("bpf_link_fops" );
36
37
const char * btf_path = "/sys/kernel/btf/vmlinux" ;
37
38
struct test_ksyms * skel ;
@@ -63,8 +64,9 @@ void test_ksyms(void)
63
64
"got %llu, exp %llu\n" , data -> out__bpf_link_fops1 , (__u64 )0 );
64
65
CHECK (data -> out__btf_size != btf_size , "btf_size" ,
65
66
"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 );
68
70
69
71
cleanup :
70
72
test_ksyms__destroy (skel );
You can’t perform that action at this time.
0 commit comments