Home
last modified time | relevance | path

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

12345678910>>...14

/tools/testing/selftests/bpf/prog_tests/
A Dtracing_struct.c10 struct tracing_struct *skel; in test_struct_args() local
13 skel = tracing_struct__open_and_load(); in test_struct_args()
17 err = tracing_struct__attach(skel); in test_struct_args()
25 ASSERT_EQ(skel->bss->t1_b, 1, "t1:b"); in test_struct_args()
26 ASSERT_EQ(skel->bss->t1_c, 4, "t1:c"); in test_struct_args()
35 ASSERT_EQ(skel->bss->t2_a, 1, "t2:a"); in test_struct_args()
38 ASSERT_EQ(skel->bss->t2_c, 4, "t2:c"); in test_struct_args()
41 ASSERT_EQ(skel->bss->t3_a, 1, "t3:a"); in test_struct_args()
42 ASSERT_EQ(skel->bss->t3_b, 4, "t3:b"); in test_struct_args()
48 ASSERT_EQ(skel->bss->t4_b, 1, "t4:b"); in test_struct_args()
[all …]
A Dtest_strncmp.c12 cmp = skel->bss->cmp_ret; in trigger_strncmp()
28 char *str = skel->bss->str; in strncmp_full_str_cmp()
37 got = trigger_strncmp(skel); in strncmp_full_str_cmp()
46 struct strncmp_test *skel; in test_strncmp_ret() local
49 skel = strncmp_test__open(); in test_strncmp_ret()
66 skel->bss->str[0] = '\0'; in test_strncmp_ret()
71 memcpy(skel->bss->str, skel->rodata->target, sizeof(skel->bss->str)); in test_strncmp_ret()
76 memcpy(skel->bss->str, skel->rodata->target, sizeof(skel->bss->str)); in test_strncmp_ret()
77 skel->bss->str[sizeof(skel->bss->str) - 1] = 'A'; in test_strncmp_ret()
89 struct strncmp_test *skel; in test_strncmp_bad_not_const_str_size() local
[all …]
A Datomics.c13 prog_fd = skel->progs.add.prog_fd; in test_add()
167 struct atomics_lskel *skel; in test_atomics() local
173 if (skel->data->skip_tests) { in test_atomics()
179 skel->bss->pid = getpid(); in test_atomics()
182 test_add(skel); in test_atomics()
184 test_sub(skel); in test_atomics()
186 test_and(skel); in test_atomics()
188 test_or(skel); in test_atomics()
190 test_xor(skel); in test_atomics()
192 test_cmpxchg(skel); in test_atomics()
[all …]
A Dattach_probe.c98 skel->links.handle_uprobe_byname = in test_attach_probe_manual()
209 skel->links.handle_kprobe_auto = bpf_program__attach(skel->progs.handle_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()
333 skel->links.handle_kprobe_sleepable = bpf_program__attach(skel->progs.handle_kprobe_sleepable); in test_kprobe_sleepable()
347 skel->links.handle_uprobe_byname3 = bpf_program__attach(skel->progs.handle_uprobe_byname3); in test_uprobe_sleepable()
359 skel->bss->user_ptr = test_data; in test_uprobe_sleepable()
374 struct test_attach_probe *skel; in test_attach_probe() local
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()
[all …]
A Darena_atomics.c243 skel->bss->pid = getpid(); in test_arena_atomics()
246 test_add(skel); in test_arena_atomics()
248 test_sub(skel); in test_arena_atomics()
250 test_and(skel); in test_arena_atomics()
252 test_or(skel); in test_arena_atomics()
254 test_xor(skel); in test_arena_atomics()
256 test_cmpxchg(skel); in test_arena_atomics()
258 test_xchg(skel); in test_arena_atomics()
260 test_uaf(skel); in test_arena_atomics()
262 test_load_acquire(skel); in test_arena_atomics()
[all …]
A Dtest_struct_ops_module.c60 struct struct_ops_module *skel; in test_struct_ops_load() local
65 skel = struct_ops_module__open(); in test_struct_ops_load()
70 skel->struct_ops.testmod_1->test_2 = skel->progs.test_3; in test_struct_ops_load()
94 if (!attach_ops_and_check(skel, skel->maps.testmod_1, 20)) in test_struct_ops_load()
96 if (!attach_ops_and_check(skel, skel->maps.testmod_2, 12)) in test_struct_ops_load()
100 struct_ops_module__destroy(skel); in test_struct_ops_load()
105 struct struct_ops_module *skel; in test_struct_ops_not_zeroed() local
146 skel->struct_ops.testmod_zeroed->zeroed_op = skel->progs.test_3; in test_struct_ops_not_zeroed()
161 struct struct_ops_module *skel; in test_struct_ops_incompatible() local
239 skel->struct_ops.ops->test_1 = skel->progs.test_1_forgotten; /* not anymore */ in test_struct_ops_forgotten_cb()
[all …]
A Dstruct_ops_autocreate.c9 struct struct_ops_autocreate *skel; in cant_load_full_object() local
13 skel = struct_ops_autocreate__open(); in cant_load_full_object()
24 err = struct_ops_autocreate__load(skel); in cant_load_full_object()
34 struct_ops_autocreate__destroy(skel); in cant_load_full_object()
54 struct struct_ops_autocreate *skel; in can_load_partial_object() local
57 skel = struct_ops_autocreate__open(); in can_load_partial_object()
75 check_test_1_link(skel, skel->maps.testmod_1); in can_load_partial_object()
78 struct_ops_autocreate__destroy(skel); in can_load_partial_object()
83 struct struct_ops_autocreate *skel; in optional_maps() local
105 check_test_1_link(skel, skel->maps.optional_map2); in optional_maps()
[all …]
A Dmap_ops.c50 if (!skel) in setup()
72 if (skel && *skel) in teardown()
78 struct test_map_ops *skel; in map_ops_update_delete_subtest() local
80 if (setup(&skel)) in map_ops_update_delete_subtest()
98 teardown(&skel); in map_ops_update_delete_subtest()
103 struct test_map_ops *skel; in map_ops_push_peek_pop_subtest() local
105 if (setup(&skel)) in map_ops_push_peek_pop_subtest()
130 teardown(&skel); in map_ops_push_peek_pop_subtest()
135 struct test_map_ops *skel; in map_ops_for_each_subtest() local
137 if (setup(&skel)) in map_ops_for_each_subtest()
[all …]
A Dbpf_loop.c17 skel->bss->nr_loops = 0; in check_nr_loops()
21 ASSERT_EQ(skel->bss->nr_loops_returned, skel->bss->nr_loops, in check_nr_loops()
25 skel->bss->nr_loops = 500; in check_nr_loops()
29 ASSERT_EQ(skel->bss->nr_loops_returned, skel->bss->nr_loops, in check_nr_loops()
34 skel->bss->nr_loops = -1; in check_nr_loops()
57 ASSERT_EQ(skel->bss->nr_loops_returned, skel->data->stop_index + 1, in check_callback_fn_stop()
74 skel->bss->nr_loops = 10; in check_null_callback_ctx()
78 ASSERT_EQ(skel->bss->nr_loops_returned, skel->bss->nr_loops, in check_null_callback_ctx()
183 struct bpf_loop *skel; in test_bpf_loop() local
192 check_nr_loops(skel); in test_bpf_loop()
[all …]
A Dfind_vma.c19 skel->bss->found_vm_exec = 0; in test_and_reset_skel()
20 skel->data->find_addr_ret = -1; in test_and_reset_skel()
21 skel->data->find_zero_ret = -1; in test_and_reset_skel()
22 skel->bss->d_iname[0] = 0; in test_and_reset_skel()
84 err = find_vma__attach(skel); in test_find_vma_kprobe()
94 struct find_vma_fail1 *skel; in test_illegal_write_vma() local
103 struct find_vma_fail2 *skel; in test_illegal_write_task() local
112 struct find_vma *skel; in serial_test_find_vma() local
121 test_find_vma_pe(skel); in serial_test_find_vma()
122 test_find_vma_kprobe(skel); in serial_test_find_vma()
[all …]
A Dcgrp_local_storage.c25 #define CGROUP_MODE_SET(skel) \ argument
39 struct cgrp_ls_tp_btf *skel; in test_tp_btf() local
47 CGROUP_MODE_SET(skel); in test_tp_btf()
75 skel->bss->target_pid = 0; in test_tp_btf()
82 cgrp_ls_tp_btf__destroy(skel); in test_tp_btf()
150 CGROUP_MODE_SET(skel); in test_recursion()
165 struct cgrp_ls_negative *skel; in test_negative() local
187 CGROUP_MODE_SET(skel); in test_cgroup_iter_sleepable()
226 CGROUP_MODE_SET(skel); in test_yes_rcu_lock()
254 CGROUP_MODE_SET(skel); in test_no_rcu_lock()
[all …]
A Drcu_read_lock.c17 struct rcu_read_lock *skel; in test_success() local
20 skel = rcu_read_lock__open(); in test_success()
36 err = rcu_read_lock__load(skel); in test_success()
49 rcu_read_lock__destroy(skel); in test_success()
54 struct rcu_read_lock *skel; in test_rcuptr_acquire() local
57 skel = rcu_read_lock__open(); in test_rcuptr_acquire()
71 rcu_read_lock__destroy(skel); in test_rcuptr_acquire()
91 struct rcu_read_lock *skel; in test_inproper_region() local
96 skel = rcu_read_lock__open(); in test_inproper_region()
107 rcu_read_lock__destroy(skel); in test_inproper_region()
[all …]
A Dcgroup1_hierarchy.c108 skel->bss->target_hid = hid; in test_cgroup1_hierarchy()
112 bpf_cgroup1(skel); in test_cgroup1_hierarchy()
118 bpf_cgroup1(skel); in test_cgroup1_hierarchy()
124 bpf_cgroup1_invalid_id(skel); in test_cgroup1_hierarchy()
129 bpf_cgroup1_invalid_id(skel); in test_cgroup1_hierarchy()
135 skel->bss->target_hid = -1; in test_cgroup1_hierarchy()
136 bpf_cgroup1_invalid_id(skel); in test_cgroup1_hierarchy()
142 bpf_cgroup1_invalid_id(skel); in test_cgroup1_hierarchy()
148 bpf_cgroup1_invalid_id(skel); in test_cgroup1_hierarchy()
152 skel->bss->target_hid = hid; in test_cgroup1_hierarchy()
[all …]
A Dpercpu_alloc.c9 struct percpu_alloc_array *skel; in test_array() local
13 skel = percpu_alloc_array__open(); in test_array()
22 skel->bss->my_pid = getpid(); in test_array()
25 err = percpu_alloc_array__load(skel); 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()
55 skel->bss->my_pid = getpid(); in test_array_sleepable()
58 err = percpu_alloc_array__load(skel); in test_array_sleepable()
73 percpu_alloc_array__destroy(skel); in test_array_sleepable()
[all …]
A Dbtf_tag.c17 struct test_btf_decl_tag *skel; in test_btf_decl_tag() local
23 if (skel->rodata->skip_tests) { in test_btf_decl_tag()
28 test_btf_decl_tag__destroy(skel); in test_btf_decl_tag()
33 struct btf_type_tag *skel; in test_btf_type_tag() local
39 if (skel->rodata->skip_tests) { in test_btf_type_tag()
44 btf_type_tag__destroy(skel); in test_btf_type_tag()
113 struct btf_type_tag_user *skel; in test_btf_type_tag_mod_user() local
119 skel = btf_type_tag_user__open(); in test_btf_type_tag_mod_user()
132 btf_type_tag_user__destroy(skel); in test_btf_type_tag_mod_user()
141 struct btf_type_tag_user *skel; in test_btf_type_tag_vmlinux_user() local
[all …]
A Dtest_ldsx_insn.c10 struct test_ldsx_insn *skel; in test_map_val_and_probed_memory() local
13 skel = test_ldsx_insn__open(); in test_map_val_and_probed_memory()
17 if (skel->rodata->skip) { in test_map_val_and_probed_memory()
26 err = test_ldsx_insn__load(skel); in test_map_val_and_probed_memory()
43 test_ldsx_insn__destroy(skel); in test_map_val_and_probed_memory()
48 struct test_ldsx_insn *skel; in test_ctx_member_sign_ext() local
57 skel = test_ldsx_insn__open(); in test_ctx_member_sign_ext()
61 if (skel->rodata->skip) { in test_ctx_member_sign_ext()
72 skel->links._getsockopt = in test_ctx_member_sign_ext()
96 struct test_ldsx_insn *skel; in test_ctx_member_narrow_sign_ext() local
[all …]
A Dtest_bpf_syscall_macro.c11 struct bpf_syscall_macro *skel = NULL; in test_bpf_syscall_macro() local
22 skel = bpf_syscall_macro__open(); in test_bpf_syscall_macro()
23 if (!ASSERT_OK_PTR(skel, "bpf_syscall_macro__open")) in test_bpf_syscall_macro()
26 skel->rodata->filter_pid = getpid(); in test_bpf_syscall_macro()
29 err = bpf_syscall_macro__load(skel); in test_bpf_syscall_macro()
34 err = bpf_syscall_macro__attach(skel); in test_bpf_syscall_macro()
41 ASSERT_EQ(skel->bss->arg1, exp_arg1, "syscall_arg1"); in test_bpf_syscall_macro()
42 ASSERT_EQ(skel->bss->arg2, exp_arg2, "syscall_arg2"); in test_bpf_syscall_macro()
43 ASSERT_EQ(skel->bss->arg3, exp_arg3, "syscall_arg3"); in test_bpf_syscall_macro()
50 ASSERT_EQ(skel->bss->arg4, exp_arg4, "syscall_arg4"); in test_bpf_syscall_macro()
[all …]
A Diters.c27 struct iters_num *skel; in subtest_num_iters() local
34 err = iters_num__attach(skel); in subtest_num_iters()
39 iters_num__detach(skel); in subtest_num_iters()
67 iters_num__destroy(skel); in subtest_num_iters()
109 struct iters_task_vma *skel; in subtest_task_vma_iters() local
126 iters_task_vma__detach(skel); in subtest_task_vma_iters()
193 iters_task__detach(skel); in subtest_task_iters()
202 iters_task__destroy(skel); in subtest_task_iters()
229 skel->bss->cg_id = cg_id; in subtest_css_task_iters()
288 iters_css__detach(skel); in subtest_css_iters()
[all …]
A Dget_func_ip_test.c12 struct get_func_ip_test *skel = NULL; in test_function_entry() local
16 skel = get_func_ip_test__open(); in test_function_entry()
20 err = get_func_ip_test__load(skel); in test_function_entry()
24 err = get_func_ip_test__attach(skel); in test_function_entry()
30 prog_fd = bpf_program__fd(skel->progs.test1); in test_function_entry()
51 get_func_ip_test__destroy(skel); in test_function_entry()
66 struct get_func_ip_test *skel = NULL; in test_function_body_kprobe() local
72 skel = get_func_ip_test__open(); in test_function_body_kprobe()
81 err = get_func_ip_test__load(skel); in test_function_body_kprobe()
100 get_func_ip_test__destroy(skel); in test_function_body_kprobe()
[all …]
A Drbtree.c20 struct rbtree *skel; in test_rbtree_add_nodes() local
32 rbtree__destroy(skel); in test_rbtree_add_nodes()
42 struct rbtree *skel; in test_rbtree_add_nodes_nested() local
54 rbtree__destroy(skel); in test_rbtree_add_nodes_nested()
64 struct rbtree *skel; in test_rbtree_add_and_remove() local
76 rbtree__destroy(skel); in test_rbtree_add_and_remove()
86 struct rbtree *skel; in test_rbtree_add_and_remove_array() local
97 rbtree__destroy(skel); in test_rbtree_add_and_remove_array()
107 struct rbtree *skel; in test_rbtree_first_and_remove() local
121 rbtree__destroy(skel); in test_rbtree_first_and_remove()
[all …]
A Dtype_cast.c9 struct type_cast *skel; in test_xdp() local
21 skel = type_cast__open(); in test_xdp()
26 err = type_cast__load(skel); in test_xdp()
36 ASSERT_EQ(skel->bss->ifindex, skel->bss->ingress_ifindex, "xdp_md ingress_ifindex"); in test_xdp()
41 type_cast__destroy(skel); in test_xdp()
46 struct type_cast *skel; in test_tc() local
55 skel = type_cast__open(); in test_tc()
73 ASSERT_EQ(skel->bss->kskb_len, skel->bss->kskb2_len, "skb len compare"); in test_tc()
76 type_cast__destroy(skel); in test_tc()
87 struct type_cast *skel; in test_negative() local
[all …]
A Dfs_kfuncs.c18 struct test_get_xattr *skel = NULL; in test_get_xattr() local
72 test_get_xattr__destroy(skel); in test_get_xattr()
102 ASSERT_EQ(strncmp(value_out, skel->data->value_bar, sizeof(skel->data->value_bar)), 0, in validate_bar_match()
154 read_and_validate_foo(skel); in test_set_remove_xattr()
155 validate_bar_match(skel); in test_set_remove_xattr()
160 read_and_validate_foo(skel); in test_set_remove_xattr()
161 validate_bar_removed(skel); in test_set_remove_xattr()
173 set_foo(skel); in test_set_remove_xattr()
174 validate_bar_match(skel); in test_set_remove_xattr()
179 set_foo(skel); in test_set_remove_xattr()
[all …]
A Dglobal_map_resize.c35 skel->bss->array[0] = 1; in global_map_resize_bss_subtest()
38 map = skel->maps.bss; in global_map_resize_bss_subtest()
50 array_len = (desired_sz - sizeof(skel->bss->sum)) / sizeof(skel->bss->array[0]); in global_map_resize_bss_subtest()
54 skel->bss = bpf_map__initial_value(skel->maps.bss, &actual_sz); in global_map_resize_bss_subtest()
64 skel->bss->array[i] = 1; in global_map_resize_bss_subtest()
67 skel->rodata->pid = getpid(); in global_map_resize_bss_subtest()
108 map = skel->maps.data_custom; in global_map_resize_data_subtest()
120 array_len = (desired_sz - sizeof(skel->bss->sum)) / sizeof(skel->data_custom->my_array[0]); in global_map_resize_data_subtest()
124 skel->data_custom = bpf_map__initial_value(skel->maps.data_custom, &actual_sz); in global_map_resize_data_subtest()
137 skel->rodata->pid = getpid(); in global_map_resize_data_subtest()
[all …]
/tools/sched_ext/include/scx/
A Denums.autogen.h7 #define SCX_ENUM_INIT(skel) do { \ argument
9 SCX_ENUM_SET(skel, scx_public_consts, SCX_SLICE_DFL); \
10 SCX_ENUM_SET(skel, scx_public_consts, SCX_SLICE_INF); \
11 SCX_ENUM_SET(skel, scx_rq_flags, SCX_RQ_ONLINE); \
13 SCX_ENUM_SET(skel, scx_rq_flags, SCX_RQ_BAL_PENDING); \
14 SCX_ENUM_SET(skel, scx_rq_flags, SCX_RQ_BAL_KEEP); \
15 SCX_ENUM_SET(skel, scx_rq_flags, SCX_RQ_BYPASSING); \
16 SCX_ENUM_SET(skel, scx_rq_flags, SCX_RQ_CLK_VALID); \
17 SCX_ENUM_SET(skel, scx_rq_flags, SCX_RQ_IN_WAKEUP); \
43 SCX_ENUM_SET(skel, scx_enq_flags, SCX_ENQ_HEAD); \
[all …]
/tools/sched_ext/
A Dscx_qmap.c57 struct scx_qmap *skel; in main() local
97 if (skel->rodata->disallow_tgid < 0) in main()
104 skel->rodata->suppress_dump = true; in main()
127 skel->bss->nr_reenqueued, skel->bss->nr_dequeued, in main()
129 skel->bss->nr_ddsp_from_enq); in main()
131 skel->bss->nr_expedited_local, in main()
137 skel->bss->cpuperf_min, in main()
138 skel->bss->cpuperf_avg, in main()
139 skel->bss->cpuperf_max, in main()
148 UEI_REPORT(skel, uei); in main()
[all …]

Completed in 718 milliseconds

12345678910>>...14