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()
125 static void test_attach_probe_auto(struct test_attach_probe *skel) in test_attach_probe_auto() argument
130 skel->links.handle_kprobe_auto = bpf_program__attach(skel->progs.handle_kprobe_auto); in test_attach_probe_auto()
131 ASSERT_OK_PTR(skel->links.handle_kprobe_auto, "attach_kprobe_auto"); in test_attach_probe_auto()
133 skel->links.handle_kretprobe_auto = bpf_program__attach(skel->progs.handle_kretprobe_auto); in test_attach_probe_auto()
134 ASSERT_OK_PTR(skel->links.handle_kretprobe_auto, "attach_kretprobe_auto"); in test_attach_probe_auto()
137 uprobe_err_link = bpf_program__attach(skel->progs.handle_uprobe_byname); in test_attach_probe_auto()
143 skel->links.handle_uretprobe_byname = in test_attach_probe_auto()
144 bpf_program__attach(skel->progs.handle_uretprobe_byname); in test_attach_probe_auto()
145 if (!ASSERT_OK_PTR(skel->links.handle_uretprobe_byname, "attach_uretprobe_byname")) in test_attach_probe_auto()
154 ASSERT_EQ(skel->bss->kprobe2_res, 11, "check_kprobe_auto_res"); in test_attach_probe_auto()
155 ASSERT_EQ(skel->bss->kretprobe2_res, 22, "check_kretprobe_auto_res"); in test_attach_probe_auto()
156 ASSERT_EQ(skel->bss->uretprobe_byname_res, 6, "check_uretprobe_byname_res"); in test_attach_probe_auto()
159 static void test_uprobe_lib(struct test_attach_probe *skel) in test_uprobe_lib() argument
169 skel->links.handle_uprobe_byname2 = in test_uprobe_lib()
170 bpf_program__attach_uprobe_opts(skel->progs.handle_uprobe_byname2, in test_uprobe_lib()
174 if (!ASSERT_OK_PTR(skel->links.handle_uprobe_byname2, "attach_uprobe_byname2")) in test_uprobe_lib()
179 skel->links.handle_uretprobe_byname2 = in test_uprobe_lib()
180 bpf_program__attach_uprobe_opts(skel->progs.handle_uretprobe_byname2, in test_uprobe_lib()
184 if (!ASSERT_OK_PTR(skel->links.handle_uretprobe_byname2, "attach_uretprobe_byname2")) in test_uprobe_lib()
191 ASSERT_EQ(skel->bss->uprobe_byname2_res, 7, "check_uprobe_byname2_res"); in test_uprobe_lib()
192 ASSERT_EQ(skel->bss->uretprobe_byname2_res, 8, "check_uretprobe_byname2_res"); in test_uprobe_lib()
195 static void test_uprobe_ref_ctr(struct test_attach_probe *skel) in test_uprobe_ref_ctr() argument
213 uprobe_link = bpf_program__attach_uprobe_opts(skel->progs.handle_uprobe_ref_ctr, in test_uprobe_ref_ctr()
220 skel->links.handle_uprobe_ref_ctr = uprobe_link; in test_uprobe_ref_ctr()
227 uretprobe_link = bpf_program__attach_uprobe_opts(skel->progs.handle_uretprobe_ref_ctr, in test_uprobe_ref_ctr()
233 skel->links.handle_uretprobe_ref_ctr = uretprobe_link; in test_uprobe_ref_ctr()
238 struct test_attach_kprobe_sleepable *skel; in test_kprobe_sleepable() local
240 skel = test_attach_kprobe_sleepable__open(); in test_kprobe_sleepable()
241 if (!ASSERT_OK_PTR(skel, "skel_kprobe_sleepable_open")) in test_kprobe_sleepable()
245 if (!ASSERT_OK(bpf_program__set_flags(skel->progs.handle_kprobe_sleepable, in test_kprobe_sleepable()
249 if (!ASSERT_OK(test_attach_kprobe_sleepable__load(skel), in test_kprobe_sleepable()
254 skel->links.handle_kprobe_sleepable = bpf_program__attach(skel->progs.handle_kprobe_sleepable); in test_kprobe_sleepable()
255 ASSERT_ERR_PTR(skel->links.handle_kprobe_sleepable, "attach_kprobe_sleepable"); in test_kprobe_sleepable()
258 test_attach_kprobe_sleepable__destroy(skel); in test_kprobe_sleepable()
261 static void test_uprobe_sleepable(struct test_attach_probe *skel) in test_uprobe_sleepable() argument
264 …skel->links.handle_uprobe_byname3_sleepable = bpf_program__attach(skel->progs.handle_uprobe_byname… in test_uprobe_sleepable()
265 if (!ASSERT_OK_PTR(skel->links.handle_uprobe_byname3_sleepable, "attach_uprobe_byname3_sleepable")) in test_uprobe_sleepable()
268 skel->links.handle_uprobe_byname3 = bpf_program__attach(skel->progs.handle_uprobe_byname3); in test_uprobe_sleepable()
269 if (!ASSERT_OK_PTR(skel->links.handle_uprobe_byname3, "attach_uprobe_byname3")) in test_uprobe_sleepable()
272 …skel->links.handle_uretprobe_byname3_sleepable = bpf_program__attach(skel->progs.handle_uretprobe_… in test_uprobe_sleepable()
273 …if (!ASSERT_OK_PTR(skel->links.handle_uretprobe_byname3_sleepable, "attach_uretprobe_byname3_sleep… in test_uprobe_sleepable()
276 skel->links.handle_uretprobe_byname3 = bpf_program__attach(skel->progs.handle_uretprobe_byname3); in test_uprobe_sleepable()
277 if (!ASSERT_OK_PTR(skel->links.handle_uretprobe_byname3, "attach_uretprobe_byname3")) in test_uprobe_sleepable()
280 skel->bss->user_ptr = test_data; in test_uprobe_sleepable()
285 ASSERT_EQ(skel->bss->uprobe_byname3_sleepable_res, 9, "check_uprobe_byname3_sleepable_res"); in test_uprobe_sleepable()
286 …ASSERT_EQ(skel->bss->uprobe_byname3_str_sleepable_res, 10, "check_uprobe_byname3_str_sleepable_res… in test_uprobe_sleepable()
287 ASSERT_EQ(skel->bss->uprobe_byname3_res, 11, "check_uprobe_byname3_res"); in test_uprobe_sleepable()
288 ASSERT_EQ(skel->bss->uretprobe_byname3_sleepable_res, 12, "check_uretprobe_byname3_sleepable_res"); in test_uprobe_sleepable()
289 …ASSERT_EQ(skel->bss->uretprobe_byname3_str_sleepable_res, 13, "check_uretprobe_byname3_str_sleepab… in test_uprobe_sleepable()
290 ASSERT_EQ(skel->bss->uretprobe_byname3_res, 14, "check_uretprobe_byname3_res"); in test_uprobe_sleepable()
295 struct test_attach_probe *skel; in test_attach_probe() local
297 skel = test_attach_probe__open(); in test_attach_probe()
298 if (!ASSERT_OK_PTR(skel, "skel_open")) in test_attach_probe()
301 if (!ASSERT_OK(test_attach_probe__load(skel), "skel_load")) in test_attach_probe()
303 if (!ASSERT_OK_PTR(skel->bss, "check_bss")) in test_attach_probe()
316 test_attach_probe_auto(skel); in test_attach_probe()
320 test_uprobe_lib(skel); in test_attach_probe()
322 test_uprobe_sleepable(skel); in test_attach_probe()
324 test_uprobe_ref_ctr(skel); in test_attach_probe()
327 test_attach_probe__destroy(skel); in test_attach_probe()