• Home
  • Raw
  • Download

Lines Matching refs:skel

11 static void kprobe_subtest(struct test_bpf_cookie *skel)  in kprobe_subtest()  argument
20 link1 = bpf_program__attach_kprobe_opts(skel->progs.handle_kprobe, in kprobe_subtest()
27 link2 = bpf_program__attach_kprobe_opts(skel->progs.handle_kprobe, in kprobe_subtest()
35 retlink1 = bpf_program__attach_kprobe_opts(skel->progs.handle_kretprobe, in kprobe_subtest()
42 retlink2 = bpf_program__attach_kprobe_opts(skel->progs.handle_kretprobe, in kprobe_subtest()
50 ASSERT_EQ(skel->bss->kprobe_res, 0x1 | 0x2, "kprobe_res"); in kprobe_subtest()
51 ASSERT_EQ(skel->bss->kretprobe_res, 0x10 | 0x20, "kretprobe_res"); in kprobe_subtest()
60 static void uprobe_subtest(struct test_bpf_cookie *skel) in uprobe_subtest() argument
74 link1 = bpf_program__attach_uprobe_opts(skel->progs.handle_uprobe, 0 /* self pid */, in uprobe_subtest()
81 link2 = bpf_program__attach_uprobe_opts(skel->progs.handle_uprobe, -1 /* any pid */, in uprobe_subtest()
89 retlink1 = bpf_program__attach_uprobe_opts(skel->progs.handle_uretprobe, -1 /* any pid */, in uprobe_subtest()
96 retlink2 = bpf_program__attach_uprobe_opts(skel->progs.handle_uretprobe, 0 /* self pid */, in uprobe_subtest()
104 ASSERT_EQ(skel->bss->uprobe_res, 0x100 | 0x200, "uprobe_res"); in uprobe_subtest()
105 ASSERT_EQ(skel->bss->uretprobe_res, 0x1000 | 0x2000, "uretprobe_res"); in uprobe_subtest()
114 static void tp_subtest(struct test_bpf_cookie *skel) in tp_subtest() argument
121 link1 = bpf_program__attach_tracepoint_opts(skel->progs.handle_tp1, in tp_subtest()
128 link2 = bpf_program__attach_tracepoint_opts(skel->progs.handle_tp2, in tp_subtest()
136 ASSERT_EQ(skel->bss->tp_res, 0x10000 | 0x20000, "tp_res1"); in tp_subtest()
146 skel->bss->tp_res = 0; in tp_subtest()
150 link3 = bpf_program__attach_tracepoint_opts(skel->progs.handle_tp3, in tp_subtest()
158 ASSERT_EQ(skel->bss->tp_res, 0x20000 | 0x40000, "tp_res2"); in tp_subtest()
183 static void pe_subtest(struct test_bpf_cookie *skel) in pe_subtest() argument
202 link = bpf_program__attach_perf_event_opts(skel->progs.handle_pe, pfd, &opts); in pe_subtest()
208 ASSERT_EQ(skel->bss->pe_res, 0x100000, "pe_res1"); in pe_subtest()
218 skel->bss->pe_res = 0; in pe_subtest()
221 link = bpf_program__attach_perf_event_opts(skel->progs.handle_pe, pfd, &opts); in pe_subtest()
227 ASSERT_EQ(skel->bss->pe_res, 0x200000, "pe_res2"); in pe_subtest()
236 struct test_bpf_cookie *skel; in test_bpf_cookie() local
238 skel = test_bpf_cookie__open_and_load(); in test_bpf_cookie()
239 if (!ASSERT_OK_PTR(skel, "skel_open")) in test_bpf_cookie()
242 skel->bss->my_tid = syscall(SYS_gettid); in test_bpf_cookie()
245 kprobe_subtest(skel); in test_bpf_cookie()
247 uprobe_subtest(skel); in test_bpf_cookie()
249 tp_subtest(skel); in test_bpf_cookie()
251 pe_subtest(skel); in test_bpf_cookie()
253 test_bpf_cookie__destroy(skel); in test_bpf_cookie()