Lines Matching refs:skel

9 	struct percpu_alloc_array *skel;  in test_array()  local
13 skel = percpu_alloc_array__open(); in test_array()
14 if (!ASSERT_OK_PTR(skel, "percpu_alloc_array__open")) in test_array()
17 bpf_program__set_autoload(skel->progs.test_array_map_1, true); in test_array()
18 bpf_program__set_autoload(skel->progs.test_array_map_2, true); in test_array()
19 bpf_program__set_autoload(skel->progs.test_array_map_3, true); in test_array()
20 bpf_program__set_autoload(skel->progs.test_array_map_4, true); in test_array()
22 skel->bss->my_pid = getpid(); in test_array()
23 skel->rodata->nr_cpus = libbpf_num_possible_cpus(); in test_array()
25 err = percpu_alloc_array__load(skel); in test_array()
29 err = percpu_alloc_array__attach(skel); in test_array()
33 prog_fd = bpf_program__fd(skel->progs.test_array_map_1); in test_array()
37 ASSERT_EQ(skel->bss->cpu0_field_d, 2, "cpu0_field_d"); in test_array()
38 ASSERT_EQ(skel->bss->sum_field_c, 1, "sum_field_c"); in test_array()
40 percpu_alloc_array__destroy(skel); in test_array()
45 struct percpu_alloc_array *skel; in test_array_sleepable() local
49 skel = percpu_alloc_array__open(); in test_array_sleepable()
50 if (!ASSERT_OK_PTR(skel, "percpu_alloc__open")) in test_array_sleepable()
53 bpf_program__set_autoload(skel->progs.test_array_map_10, true); in test_array_sleepable()
55 skel->bss->my_pid = getpid(); in test_array_sleepable()
56 skel->rodata->nr_cpus = libbpf_num_possible_cpus(); in test_array_sleepable()
58 err = percpu_alloc_array__load(skel); in test_array_sleepable()
62 err = percpu_alloc_array__attach(skel); in test_array_sleepable()
66 prog_fd = bpf_program__fd(skel->progs.test_array_map_10); in test_array_sleepable()
70 ASSERT_EQ(skel->bss->cpu0_field_d, 2, "cpu0_field_d"); in test_array_sleepable()
71 ASSERT_EQ(skel->bss->sum_field_c, 1, "sum_field_c"); in test_array_sleepable()
73 percpu_alloc_array__destroy(skel); in test_array_sleepable()
78 struct percpu_alloc_cgrp_local_storage *skel; in test_cgrp_local_storage() local
86 skel = percpu_alloc_cgrp_local_storage__open(); in test_cgrp_local_storage()
87 if (!ASSERT_OK_PTR(skel, "percpu_alloc_cgrp_local_storage__open")) in test_cgrp_local_storage()
90 skel->bss->my_pid = getpid(); in test_cgrp_local_storage()
91 skel->rodata->nr_cpus = libbpf_num_possible_cpus(); in test_cgrp_local_storage()
93 err = percpu_alloc_cgrp_local_storage__load(skel); in test_cgrp_local_storage()
97 err = percpu_alloc_cgrp_local_storage__attach(skel); in test_cgrp_local_storage()
101 prog_fd = bpf_program__fd(skel->progs.test_cgrp_local_storage_1); in test_cgrp_local_storage()
105 ASSERT_EQ(skel->bss->cpu0_field_d, 2, "cpu0_field_d"); in test_cgrp_local_storage()
106 ASSERT_EQ(skel->bss->sum_field_c, 1, "sum_field_c"); in test_cgrp_local_storage()
109 percpu_alloc_cgrp_local_storage__destroy(skel); in test_cgrp_local_storage()