Lines Matching refs:skel
43 struct test_attach_probe_manual *skel; in test_attach_probe_manual() local
46 skel = test_attach_probe_manual__open_and_load(); in test_attach_probe_manual()
47 if (!ASSERT_OK_PTR(skel, "skel_kprobe_manual_open_and_load")) in test_attach_probe_manual()
57 kprobe_link = bpf_program__attach_kprobe_opts(skel->progs.handle_kprobe, in test_attach_probe_manual()
62 skel->links.handle_kprobe = kprobe_link; in test_attach_probe_manual()
65 kretprobe_link = bpf_program__attach_kprobe_opts(skel->progs.handle_kretprobe, in test_attach_probe_manual()
70 skel->links.handle_kretprobe = kretprobe_link; in test_attach_probe_manual()
76 uprobe_link = bpf_program__attach_uprobe_opts(skel->progs.handle_uprobe, in test_attach_probe_manual()
83 skel->links.handle_uprobe = uprobe_link; in test_attach_probe_manual()
86 uretprobe_link = bpf_program__attach_uprobe_opts(skel->progs.handle_uretprobe, in test_attach_probe_manual()
92 skel->links.handle_uretprobe = uretprobe_link; in test_attach_probe_manual()
98 skel->links.handle_uprobe_byname = in test_attach_probe_manual()
99 bpf_program__attach_uprobe_opts(skel->progs.handle_uprobe_byname, in test_attach_probe_manual()
103 if (!ASSERT_OK_PTR(skel->links.handle_uprobe_byname, "attach_uprobe_byname")) in test_attach_probe_manual()
115 ASSERT_EQ(skel->bss->kprobe_res, 1, "check_kprobe_res"); in test_attach_probe_manual()
116 ASSERT_EQ(skel->bss->kretprobe_res, 2, "check_kretprobe_res"); in test_attach_probe_manual()
117 ASSERT_EQ(skel->bss->uprobe_res, 3, "check_uprobe_res"); in test_attach_probe_manual()
118 ASSERT_EQ(skel->bss->uretprobe_res, 4, "check_uretprobe_res"); in test_attach_probe_manual()
119 ASSERT_EQ(skel->bss->uprobe_byname_res, 5, "check_uprobe_byname_res"); in test_attach_probe_manual()
122 test_attach_probe_manual__destroy(skel); in test_attach_probe_manual()
130 struct test_attach_probe_manual *skel; in test_attach_uprobe_long_event_name() local
134 skel = test_attach_probe_manual__open_and_load(); in test_attach_uprobe_long_event_name()
135 if (!ASSERT_OK_PTR(skel, "skel_kprobe_manual_open_and_load")) in test_attach_uprobe_long_event_name()
149 uprobe_link = bpf_program__attach_uprobe_opts(skel->progs.handle_uprobe, in test_attach_uprobe_long_event_name()
156 skel->links.handle_uprobe = uprobe_link; in test_attach_uprobe_long_event_name()
159 uretprobe_link = bpf_program__attach_uprobe_opts(skel->progs.handle_uretprobe, in test_attach_uprobe_long_event_name()
165 skel->links.handle_uretprobe = uretprobe_link; in test_attach_uprobe_long_event_name()
168 test_attach_probe_manual__destroy(skel); in test_attach_uprobe_long_event_name()
176 struct test_attach_probe_manual *skel; in test_attach_kprobe_long_event_name() local
178 skel = test_attach_probe_manual__open_and_load(); in test_attach_kprobe_long_event_name()
179 if (!ASSERT_OK_PTR(skel, "skel_kprobe_manual_open_and_load")) in test_attach_kprobe_long_event_name()
185 kprobe_link = bpf_program__attach_kprobe_opts(skel->progs.handle_kprobe, in test_attach_kprobe_long_event_name()
190 skel->links.handle_kprobe = kprobe_link; in test_attach_kprobe_long_event_name()
193 kretprobe_link = bpf_program__attach_kprobe_opts(skel->progs.handle_kretprobe, in test_attach_kprobe_long_event_name()
198 skel->links.handle_kretprobe = kretprobe_link; in test_attach_kprobe_long_event_name()
201 test_attach_probe_manual__destroy(skel); in test_attach_kprobe_long_event_name()
204 static void test_attach_probe_auto(struct test_attach_probe *skel) in test_attach_probe_auto() argument
209 skel->links.handle_kprobe_auto = bpf_program__attach(skel->progs.handle_kprobe_auto); in test_attach_probe_auto()
210 ASSERT_OK_PTR(skel->links.handle_kprobe_auto, "attach_kprobe_auto"); in test_attach_probe_auto()
212 skel->links.handle_kretprobe_auto = bpf_program__attach(skel->progs.handle_kretprobe_auto); in test_attach_probe_auto()
213 ASSERT_OK_PTR(skel->links.handle_kretprobe_auto, "attach_kretprobe_auto"); in test_attach_probe_auto()
216 uprobe_err_link = bpf_program__attach(skel->progs.handle_uprobe_byname); in test_attach_probe_auto()
222 skel->links.handle_uretprobe_byname = in test_attach_probe_auto()
223 bpf_program__attach(skel->progs.handle_uretprobe_byname); in test_attach_probe_auto()
224 if (!ASSERT_OK_PTR(skel->links.handle_uretprobe_byname, "attach_uretprobe_byname")) in test_attach_probe_auto()
233 ASSERT_EQ(skel->bss->kprobe2_res, 11, "check_kprobe_auto_res"); in test_attach_probe_auto()
234 ASSERT_EQ(skel->bss->kretprobe2_res, 22, "check_kretprobe_auto_res"); in test_attach_probe_auto()
235 ASSERT_EQ(skel->bss->uretprobe_byname_res, 6, "check_uretprobe_byname_res"); in test_attach_probe_auto()
238 static void test_uprobe_lib(struct test_attach_probe *skel) in test_uprobe_lib() argument
248 skel->links.handle_uprobe_byname2 = in test_uprobe_lib()
249 bpf_program__attach_uprobe_opts(skel->progs.handle_uprobe_byname2, in test_uprobe_lib()
253 if (!ASSERT_OK_PTR(skel->links.handle_uprobe_byname2, "attach_uprobe_byname2")) in test_uprobe_lib()
258 skel->links.handle_uretprobe_byname2 = in test_uprobe_lib()
259 bpf_program__attach_uprobe_opts(skel->progs.handle_uretprobe_byname2, in test_uprobe_lib()
263 if (!ASSERT_OK_PTR(skel->links.handle_uretprobe_byname2, "attach_uretprobe_byname2")) in test_uprobe_lib()
270 ASSERT_EQ(skel->bss->uprobe_byname2_res, 7, "check_uprobe_byname2_res"); in test_uprobe_lib()
271 ASSERT_EQ(skel->bss->uretprobe_byname2_res, 8, "check_uretprobe_byname2_res"); in test_uprobe_lib()
274 static void test_uprobe_ref_ctr(struct test_attach_probe *skel) in test_uprobe_ref_ctr() argument
292 uprobe_link = bpf_program__attach_uprobe_opts(skel->progs.handle_uprobe_ref_ctr, in test_uprobe_ref_ctr()
299 skel->links.handle_uprobe_ref_ctr = uprobe_link; in test_uprobe_ref_ctr()
306 uretprobe_link = bpf_program__attach_uprobe_opts(skel->progs.handle_uretprobe_ref_ctr, in test_uprobe_ref_ctr()
312 skel->links.handle_uretprobe_ref_ctr = uretprobe_link; in test_uprobe_ref_ctr()
317 struct test_attach_kprobe_sleepable *skel; in test_kprobe_sleepable() local
319 skel = test_attach_kprobe_sleepable__open(); in test_kprobe_sleepable()
320 if (!ASSERT_OK_PTR(skel, "skel_kprobe_sleepable_open")) in test_kprobe_sleepable()
324 if (!ASSERT_OK(bpf_program__set_flags(skel->progs.handle_kprobe_sleepable, in test_kprobe_sleepable()
328 if (!ASSERT_OK(test_attach_kprobe_sleepable__load(skel), in test_kprobe_sleepable()
333 skel->links.handle_kprobe_sleepable = bpf_program__attach(skel->progs.handle_kprobe_sleepable); in test_kprobe_sleepable()
334 ASSERT_ERR_PTR(skel->links.handle_kprobe_sleepable, "attach_kprobe_sleepable"); in test_kprobe_sleepable()
337 test_attach_kprobe_sleepable__destroy(skel); in test_kprobe_sleepable()
340 static void test_uprobe_sleepable(struct test_attach_probe *skel) in test_uprobe_sleepable() argument
343 …skel->links.handle_uprobe_byname3_sleepable = bpf_program__attach(skel->progs.handle_uprobe_byname… in test_uprobe_sleepable()
344 if (!ASSERT_OK_PTR(skel->links.handle_uprobe_byname3_sleepable, "attach_uprobe_byname3_sleepable")) in test_uprobe_sleepable()
347 skel->links.handle_uprobe_byname3 = bpf_program__attach(skel->progs.handle_uprobe_byname3); in test_uprobe_sleepable()
348 if (!ASSERT_OK_PTR(skel->links.handle_uprobe_byname3, "attach_uprobe_byname3")) in test_uprobe_sleepable()
351 …skel->links.handle_uretprobe_byname3_sleepable = bpf_program__attach(skel->progs.handle_uretprobe_… in test_uprobe_sleepable()
352 …if (!ASSERT_OK_PTR(skel->links.handle_uretprobe_byname3_sleepable, "attach_uretprobe_byname3_sleep… in test_uprobe_sleepable()
355 skel->links.handle_uretprobe_byname3 = bpf_program__attach(skel->progs.handle_uretprobe_byname3); in test_uprobe_sleepable()
356 if (!ASSERT_OK_PTR(skel->links.handle_uretprobe_byname3, "attach_uretprobe_byname3")) in test_uprobe_sleepable()
359 skel->bss->user_ptr = test_data; in test_uprobe_sleepable()
364 ASSERT_EQ(skel->bss->uprobe_byname3_sleepable_res, 9, "check_uprobe_byname3_sleepable_res"); in test_uprobe_sleepable()
365 …ASSERT_EQ(skel->bss->uprobe_byname3_str_sleepable_res, 10, "check_uprobe_byname3_str_sleepable_res… in test_uprobe_sleepable()
366 ASSERT_EQ(skel->bss->uprobe_byname3_res, 11, "check_uprobe_byname3_res"); in test_uprobe_sleepable()
367 ASSERT_EQ(skel->bss->uretprobe_byname3_sleepable_res, 12, "check_uretprobe_byname3_sleepable_res"); in test_uprobe_sleepable()
368 …ASSERT_EQ(skel->bss->uretprobe_byname3_str_sleepable_res, 13, "check_uretprobe_byname3_str_sleepab… in test_uprobe_sleepable()
369 ASSERT_EQ(skel->bss->uretprobe_byname3_res, 14, "check_uretprobe_byname3_res"); in test_uprobe_sleepable()
374 struct test_attach_probe *skel; in test_attach_probe() local
376 skel = test_attach_probe__open(); in test_attach_probe()
377 if (!ASSERT_OK_PTR(skel, "skel_open")) in test_attach_probe()
380 if (!ASSERT_OK(test_attach_probe__load(skel), "skel_load")) in test_attach_probe()
382 if (!ASSERT_OK_PTR(skel->bss, "check_bss")) in test_attach_probe()
395 test_attach_probe_auto(skel); in test_attach_probe()
399 test_uprobe_lib(skel); in test_attach_probe()
401 test_uprobe_sleepable(skel); in test_attach_probe()
403 test_uprobe_ref_ctr(skel); in test_attach_probe()
411 test_attach_probe__destroy(skel); in test_attach_probe()