Home
last modified time | relevance | path

Searched refs:skel (Results 1 – 25 of 136) sorted by relevance

123456

/linux/tools/testing/selftests/bpf/prog_tests/
A Datomics.c17 prog_fd = skel->progs.add.prog_fd; in test_add()
215 struct atomics_lskel *skel; in test_atomics() local
222 if (skel->data->skip_tests) { in test_atomics()
228 skel->bss->pid = getpid(); in test_atomics()
231 test_add(skel); in test_atomics()
233 test_sub(skel); in test_atomics()
235 test_and(skel); in test_atomics()
237 test_or(skel); in test_atomics()
239 test_xor(skel); in test_atomics()
241 test_cmpxchg(skel); in test_atomics()
[all …]
A Dbpf_iter.c129 struct bpf_iter_task *skel; in test_task() local
172 skel->bss->tgid = getpid(); in test_task_file()
244 bss = skel->bss; in test_task_btf()
246 ret = do_btf_read(skel); in test_task_btf()
263 struct bpf_iter_tcp4 *skel; in test_tcp4() local
277 struct bpf_iter_tcp6 *skel; in test_tcp6() local
291 struct bpf_iter_udp4 *skel; in test_udp4() local
305 struct bpf_iter_udp6 *skel; in test_udp6() local
498 skel->rodata->ret1 = ret1; in test_overflow()
572 CHECK(skel->bss->map2_seqnum1 != skel->bss->map2_seqnum2, in test_overflow()
[all …]
A Dcheck_mtu.c128 test_check_mtu_run_xdp(skel, skel->progs.xdp_use_helper, mtu); in test_check_mtu_xdp()
129 test_check_mtu_run_xdp(skel, skel->progs.xdp_exceed_mtu, mtu); in test_check_mtu_xdp()
130 test_check_mtu_run_xdp(skel, skel->progs.xdp_minus_delta, mtu); in test_check_mtu_xdp()
131 test_check_mtu_run_xdp(skel, skel->progs.xdp_input_len, mtu); in test_check_mtu_xdp()
132 test_check_mtu_run_xdp(skel, skel->progs.xdp_input_len_exceed, mtu); in test_check_mtu_xdp()
188 test_check_mtu_run_tc(skel, skel->progs.tc_use_helper, mtu); in test_check_mtu_tc()
189 test_check_mtu_run_tc(skel, skel->progs.tc_exceed_mtu, mtu); in test_check_mtu_tc()
190 test_check_mtu_run_tc(skel, skel->progs.tc_exceed_mtu_da, mtu); in test_check_mtu_tc()
191 test_check_mtu_run_tc(skel, skel->progs.tc_minus_delta, mtu); in test_check_mtu_tc()
192 test_check_mtu_run_tc(skel, skel->progs.tc_input_len, mtu); in test_check_mtu_tc()
[all …]
A Dringbuf.c66 skel->bss->dropped = 0; in trigger_samples()
67 skel->bss->total = 0; in trigger_samples()
68 skel->bss->discarded = 0; in trigger_samples()
71 skel->bss->value = 333; in trigger_samples()
73 skel->bss->value = 777; in trigger_samples()
150 skel->bss->pid = getpid(); in test_ringbuf()
241 skel->bss->flags = 0; in test_ringbuf()
257 skel->bss->dropped = 0; in test_ringbuf()
258 skel->bss->total = 0; in test_ringbuf()
261 skel->bss->value = 333; in test_ringbuf()
[all …]
A Dbtf_skc_cls_ingress.c77 memset(&skel->bss->srv_sa6, 0, sizeof(skel->bss->srv_sa6)); in reset_test()
81 skel->bss->gen_cookie = 0; in reset_test()
82 skel->bss->linum = 0; in reset_test()
87 if (skel->bss->linum) in print_err_line()
123 skel->bss->listen_tp_sport, skel->bss->req_sk_sport, in test_conn()
127 if (CHECK(skel->bss->gen_cookie || skel->bss->recv_cookie, in test_conn()
130 skel->bss->gen_cookie, skel->bss->recv_cookie)) in test_conn()
134 skel->bss->linum); in test_conn()
187 skel->bss->gen_cookie != skel->bss->recv_cookie, in test_syncookie()
190 skel->bss->gen_cookie, skel->bss->recv_cookie)) in test_syncookie()
[all …]
A Dsnprintf.c40 struct test_snprintf *skel; in test_snprintf_positive() local
42 skel = test_snprintf__open_and_load(); in test_snprintf_positive()
43 if (!ASSERT_OK_PTR(skel, "skel_open")) in test_snprintf_positive()
46 skel->bss->pid = getpid(); in test_snprintf_positive()
60 ASSERT_OK(memcmp(skel->bss->sym_out, exp_sym_out, in test_snprintf_positive()
83 test_snprintf__destroy(skel); in test_snprintf_positive()
91 struct test_snprintf_single *skel; in load_single_snprintf() local
94 skel = test_snprintf_single__open(); in load_single_snprintf()
95 if (!skel) in load_single_snprintf()
100 ret = test_snprintf_single__load(skel); in load_single_snprintf()
[all …]
A Dtask_local_storage.c15 struct task_local_storage *skel; in test_sys_enter_exit() local
18 skel = task_local_storage__open_and_load(); in test_sys_enter_exit()
19 if (!ASSERT_OK_PTR(skel, "skel_open_and_load")) in test_sys_enter_exit()
22 skel->bss->target_pid = syscall(SYS_gettid); in test_sys_enter_exit()
24 err = task_local_storage__attach(skel); in test_sys_enter_exit()
36 task_local_storage__destroy(skel); in test_sys_enter_exit()
41 struct task_local_storage_exit_creds *skel; in test_exit_creds() local
66 struct task_ls_recursion *skel; in test_recursion() local
69 skel = task_ls_recursion__open_and_load(); in test_recursion()
73 err = task_ls_recursion__attach(skel); in test_recursion()
[all …]
A Dsk_lookup.c1161 run_sk_assign_v4(skel, skel->progs.sk_assign_eexist); in test_sk_assign_helper()
1163 run_sk_assign_v4(skel, skel->progs.sk_assign_replace_flag); in test_sk_assign_helper()
1165 run_sk_assign_v4(skel, skel->progs.sk_assign_null); in test_sk_assign_helper()
1167 run_sk_assign_v4(skel, skel->progs.access_ctx_sk); in test_sk_assign_helper()
1169 run_sk_assign_v4(skel, skel->progs.ctx_narrow_access); in test_sk_assign_helper()
1171 run_sk_assign_v6(skel, skel->progs.ctx_narrow_access); in test_sk_assign_helper()
1331 query_lookup_prog(skel); in run_tests()
1332 test_redirect_lookup(skel); in run_tests()
1333 test_drop_on_lookup(skel); in run_tests()
1335 test_sk_assign_helper(skel); in run_tests()
[all …]
A Dbpf_cookie.c146 skel->bss->tp_res = 0; in tp_subtest()
218 skel->bss->pe_res = 0; 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()
[all …]
A Dringbuf_multi.c43 struct test_ringbuf_multi *skel; in test_ringbuf_multi() local
81 skel->bss->pid = getpid(); in test_ringbuf_multi()
98 skel->bss->target_ring = 0; in test_ringbuf_multi()
99 skel->bss->value = 333; in test_ringbuf_multi()
103 skel->bss->target_ring = 1; in test_ringbuf_multi()
104 skel->bss->value = 555; in test_ringbuf_multi()
107 skel->bss->target_ring = 2; in test_ringbuf_multi()
108 skel->bss->value = 777; in test_ringbuf_multi()
122 0L, skel->bss->dropped); in test_ringbuf_multi()
124 1L, skel->bss->skipped); in test_ringbuf_multi()
[all …]
A Dfor_each.c13 struct for_each_hash_map_elem *skel; in test_hash_map() local
18 skel = for_each_hash_map_elem__open_and_load(); in test_hash_map()
22 hashmap_fd = bpf_map__fd(skel->maps.hashmap); in test_hash_map()
60 ASSERT_LT(skel->bss->cpu, num_cpus, "num_cpus"); in test_hash_map()
63 ASSERT_EQ(skel->bss->percpu_val, skel->bss->cpu + 1, "percpu_val"); in test_hash_map()
67 for_each_hash_map_elem__destroy(skel); in test_hash_map()
74 struct for_each_array_map_elem *skel; in test_array_map() local
78 skel = for_each_array_map_elem__open_and_load(); in test_array_map()
82 arraymap_fd = bpf_map__fd(skel->maps.arraymap); in test_array_map()
117 ASSERT_EQ(skel->bss->cpu + 1, skel->bss->percpu_val, "percpu_val"); in test_array_map()
[all …]
A Dlookup_and_delete.c47 struct test_lookup_and_delete *skel; in setup_prog() local
50 skel = test_lookup_and_delete__open(); in setup_prog()
70 return skel; in setup_prog()
73 test_lookup_and_delete__destroy(skel); in setup_prog()
83 skel->bss->set_pid = getpid(); in trigger_tp()
84 skel->bss->set_key = key; in trigger_tp()
85 skel->bss->set_value = value; in trigger_tp()
93 test_lookup_and_delete__detach(skel); in trigger_tp()
100 struct test_lookup_and_delete *skel; in test_lookup_and_delete_hash() local
135 struct test_lookup_and_delete *skel; in test_lookup_and_delete_percpu_hash() local
[all …]
A Dbtf_map_in_map.c27 struct test_btf_map_in_map *skel; in test_lookup_update() local
30 skel = test_btf_map_in_map__open_and_load(); in test_lookup_update()
34 err = test_btf_map_in_map__attach(skel); in test_lookup_update()
51 skel->bss->input = 1; in test_lookup_update()
64 skel->bss->input = 3; in test_lookup_update()
75 skel->bss->input = 5; in test_lookup_update()
105 test_btf_map_in_map__destroy(skel); in test_lookup_update()
106 skel = NULL; in test_lookup_update()
130 test_btf_map_in_map__destroy(skel); in test_lookup_update()
135 struct test_btf_map_in_map *skel; in test_diff_size() local
[all …]
A Dattach_probe.c19 struct test_attach_probe* skel; in test_attach_probe() local
47 skel = test_attach_probe__open_and_load(); in test_attach_probe()
48 if (CHECK(!skel, "skel_open", "failed to open skeleton\n")) in test_attach_probe()
58 skel->links.handle_kprobe = kprobe_link; in test_attach_probe()
65 skel->links.handle_kretprobe = kretprobe_link; in test_attach_probe()
79 skel->links.handle_uprobe = uprobe_link; in test_attach_probe()
93 skel->links.handle_uretprobe = uretprobe_link; in test_attach_probe()
98 if (CHECK(skel->bss->kprobe_res != 1, "check_kprobe_res", in test_attach_probe()
99 "wrong kprobe res: %d\n", skel->bss->kprobe_res)) in test_attach_probe()
109 "wrong uprobe res: %d\n", skel->bss->uprobe_res)) in test_attach_probe()
[all …]
A Ddummy_st_ops.c13 struct dummy_st_ops *skel; in test_dummy_st_ops_attach() local
16 skel = dummy_st_ops__open_and_load(); in test_dummy_st_ops_attach()
23 dummy_st_ops__destroy(skel); in test_dummy_st_ops_attach()
33 struct dummy_st_ops *skel; in test_dummy_init_ret_value() local
36 skel = dummy_st_ops__open_and_load(); in test_dummy_init_ret_value()
46 dummy_st_ops__destroy(skel); in test_dummy_init_ret_value()
60 struct dummy_st_ops *skel; in test_dummy_init_ptr_arg() local
63 skel = dummy_st_ops__open_and_load(); in test_dummy_init_ptr_arg()
74 dummy_st_ops__destroy(skel); in test_dummy_init_ptr_arg()
84 struct dummy_st_ops *skel; in test_dummy_multiple_args() local
[all …]
A Dksyms_btf.c19 struct test_ksyms_btf *skel = NULL; in test_basic() local
35 skel = test_ksyms_btf__open_and_load(); in test_basic()
39 err = test_ksyms_btf__attach(skel); in test_basic()
46 data = skel->data; in test_basic()
73 test_ksyms_btf__destroy(skel); in test_basic()
88 struct test_ksyms_weak *skel; in test_weak_syms() local
96 err = test_ksyms_weak__attach(skel); in test_weak_syms()
103 data = skel->data; in test_weak_syms()
110 test_ksyms_weak__destroy(skel); in test_weak_syms()
115 struct test_ksyms_weak_lskel *skel; in test_weak_syms_lskel() local
[all …]
A Dsockmap_basic.c117 if (CHECK_FAIL(!skel)) { in test_skmsg_helpers()
144 struct test_sockmap_update *skel; in test_sockmap_update() local
159 src = bpf_map__fd(skel->maps.src); in test_sockmap_update()
161 dst_map = skel->maps.dst_sock_map; in test_sockmap_update()
205 struct bpf_iter_sockmap *skel; in test_sockmap_copy() local
216 src = skel->maps.sockmap; in test_sockmap_copy()
220 src = skel->maps.sockhash; in test_sockmap_copy()
263 skel->bss->elems, num_elems)) in test_sockmap_copy()
267 skel->bss->socks, num_sockets)) in test_sockmap_copy()
282 bpf_iter_sockmap__destroy(skel); in test_sockmap_copy()
[all …]
A Dget_func_ip_test.c7 struct get_func_ip_test *skel = NULL; in test_get_func_ip_test() local
11 skel = get_func_ip_test__open(); in test_get_func_ip_test()
12 if (!ASSERT_OK_PTR(skel, "get_func_ip_test__open")) in test_get_func_ip_test()
19 bpf_program__set_autoload(skel->progs.test6, false); in test_get_func_ip_test()
20 bpf_program__set_autoload(skel->progs.test7, false); in test_get_func_ip_test()
23 err = get_func_ip_test__load(skel); in test_get_func_ip_test()
27 err = get_func_ip_test__attach(skel); in test_get_func_ip_test()
31 prog_fd = bpf_program__fd(skel->progs.test1); in test_get_func_ip_test()
37 prog_fd = bpf_program__fd(skel->progs.test5); in test_get_func_ip_test()
43 ASSERT_EQ(skel->bss->test1_result, 1, "test1_result"); in test_get_func_ip_test()
[all …]
A Dlinked_vars.c11 struct linked_vars *skel; in test_linked_vars() local
13 skel = linked_vars__open(); in test_linked_vars()
14 if (!ASSERT_OK_PTR(skel, "skel_open")) in test_linked_vars()
17 skel->bss->input_bss1 = 1000; in test_linked_vars()
18 skel->bss->input_bss2 = 2000; in test_linked_vars()
19 skel->bss->input_bss_weak = 3000; in test_linked_vars()
21 err = linked_vars__load(skel); in test_linked_vars()
25 err = linked_vars__attach(skel); in test_linked_vars()
35 ASSERT_EQ(skel->bss->output_data1, 1 + 2 + 10, "output_bss1"); in test_linked_vars()
36 ASSERT_EQ(skel->bss->output_data2, 1 + 2 + 10, "output_bss2"); in test_linked_vars()
[all …]
A Dmap_init.c41 struct test_map_init *skel; in setup() local
44 skel = test_map_init__open(); in setup()
56 err = test_map_init__load(skel); in setup()
68 return skel; in setup()
73 test_map_init__destroy(skel); in setup()
83 bss = skel->bss; in prog_run_insert_elem()
95 test_map_init__detach(skel); in prog_run_insert_elem()
132 struct test_map_init *skel; in test_pcpu_map_init() local
161 test_map_init__destroy(skel); in test_pcpu_map_init()
172 struct test_map_init *skel; in test_pcpu_lru_map_init() local
[all …]
A Drecursion.c10 struct recursion *skel; in test_recursion() local
14 skel = recursion__open_and_load(); in test_recursion()
15 if (!ASSERT_OK_PTR(skel, "skel_open_and_load")) in test_recursion()
18 err = recursion__attach(skel); in test_recursion()
22 ASSERT_EQ(skel->bss->pass1, 0, "pass1 == 0"); in test_recursion()
24 ASSERT_EQ(skel->bss->pass1, 1, "pass1 == 1"); in test_recursion()
26 ASSERT_EQ(skel->bss->pass1, 2, "pass1 == 2"); in test_recursion()
28 ASSERT_EQ(skel->bss->pass2, 0, "pass2 == 0"); in test_recursion()
30 ASSERT_EQ(skel->bss->pass2, 1, "pass2 == 1"); in test_recursion()
32 ASSERT_EQ(skel->bss->pass2, 2, "pass2 == 2"); in test_recursion()
[all …]
A Dtest_lsm.c54 static int test_lsm(struct lsm *skel) in test_lsm() argument
60 err = lsm__attach(skel); in test_lsm()
89 lsm__detach(skel); in test_lsm()
91 skel->bss->copy_test = 0; in test_lsm()
92 skel->bss->bprm_count = 0; in test_lsm()
93 skel->bss->mprotect_count = 0; in test_lsm()
99 struct lsm *skel = NULL; in test_test_lsm() local
102 skel = lsm__open_and_load(); in test_test_lsm()
106 err = test_lsm(skel); in test_test_lsm()
110 err = test_lsm(skel); in test_test_lsm()
[all …]
A Dlinked_funcs.c11 struct linked_funcs *skel; in test_linked_funcs() local
13 skel = linked_funcs__open(); in test_linked_funcs()
14 if (!ASSERT_OK_PTR(skel, "skel_open")) in test_linked_funcs()
17 skel->rodata->my_tid = syscall(SYS_gettid); in test_linked_funcs()
18 skel->bss->syscall_id = SYS_getpgid; in test_linked_funcs()
20 err = linked_funcs__load(skel); in test_linked_funcs()
24 err = linked_funcs__attach(skel); in test_linked_funcs()
31 ASSERT_EQ(skel->bss->output_val1, 2000 + 2000, "output_val1"); in test_linked_funcs()
33 ASSERT_EQ(skel->bss->output_weak1, 42, "output_weak1"); in test_linked_funcs()
38 ASSERT_EQ(skel->bss->output_weak2, 0, "output_weak2"); in test_linked_funcs()
[all …]
/linux/samples/v4l/
A Dv4l2-pci-skeleton.c171 skel->field = skel->format.field; in queue_setup()
415 if (skel->input) in skeleton_s_std()
435 skel->std = std; in skeleton_s_std()
438 skeleton_fill_pix_format(skel, &skel->format); in skeleton_s_std()
447 if (skel->input) in skeleton_g_std()
466 if (skel->input) in skeleton_querystd()
523 skeleton_fill_pix_format(skel, &skel->format); in skeleton_s_dv_timings()
636 skel->input = i; in skeleton_s_input()
645 skeleton_fill_pix_format(skel, &skel->format); in skeleton_s_input()
777 if (!skel) { in skeleton_probe()
[all …]
/linux/tools/testing/selftests/bpf/benchs/
A Dbench_bloom_filter_map.c17 struct bloom_filter_bench *skel; member
251 struct bloom_filter_bench *skel; in setup_skeleton() local
258 if (!skel) { in setup_skeleton()
293 return skel; in setup_skeleton()
302 ctx.skel = setup_skeleton(); in bloom_lookup_setup()
319 ctx.skel = setup_skeleton(); in bloom_update_setup()
338 ctx.skel = setup_skeleton(); in false_positive_setup()
356 ctx.skel = setup_skeleton(); in hashmap_with_bloom_setup()
373 ctx.skel = setup_skeleton(); in hashmap_no_bloom_setup()
396 if (ctx.skel->bss->error != 0) { in measure()
[all …]

Completed in 37 milliseconds

123456