| /linux/tools/testing/selftests/bpf/prog_tests/ |
| A D | tracing_struct.c | 23 ASSERT_EQ(skel->bss->t1_a_a, 2, "t1:a.a"); 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() 49 ASSERT_EQ(skel->bss->t4_c, 2, "t4:c"); in test_struct_args() 50 ASSERT_EQ(skel->bss->t4_d, 3, "t4:d"); in test_struct_args() [all …]
|
| A D | usdt.c | 47 struct test_usdt__bss *bss; in subtest_basic_usdt() local 54 bss = skel->bss; in subtest_basic_usdt() 55 bss->my_pid = getpid(); in subtest_basic_usdt() 213 struct test_usdt__bss *bss; in subtest_multispec_usdt() local 220 bss = skel->bss; in subtest_multispec_usdt() 221 bss->my_pid = getpid(); in subtest_multispec_usdt() 250 bss->usdt_100_sum = 0; in subtest_multispec_usdt() 276 bss->usdt_100_called = 0; in subtest_multispec_usdt() 277 bss->usdt_100_sum = 0; in subtest_multispec_usdt() 351 bss = skel->bss; in subtest_urandom_usdt() [all …]
|
| A D | skeleton.c | 36 bss = skel->bss; in test_skeleton() 51 CHECK(bss->in3 != 0, "in3", "got %d != exp %d\n", bss->in3, 0); in test_skeleton() 52 CHECK(bss->out3 != 0, "out3", "got %d != exp %d\n", bss->out3, 0); in test_skeleton() 57 CHECK(bss->out6 != 0, "out6", "got %d != exp %d\n", bss->out6, 0); in test_skeleton() 68 bss->in3 = 12; in test_skeleton() 69 bss->in4 = 13; in test_skeleton() 83 CHECK(bss->in3 != 12, "in3", "got %d != exp %d\n", bss->in3, 12); in test_skeleton() 94 bss->in3 = 3; in test_skeleton() 95 bss->in4 = 4; in test_skeleton() 96 bss->in5.a = 5; in test_skeleton() [all …]
|
| A D | test_bpf_syscall_macro.c | 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() 46 ASSERT_NEQ(skel->bss->arg4_cx, exp_arg4, "syscall_arg4_from_cx"); in test_bpf_syscall_macro() 48 ASSERT_EQ(skel->bss->arg4_cx, exp_arg4, "syscall_arg4_from_cx"); in test_bpf_syscall_macro() 50 ASSERT_EQ(skel->bss->arg4, exp_arg4, "syscall_arg4"); in test_bpf_syscall_macro() 51 ASSERT_EQ(skel->bss->arg5, exp_arg5, "syscall_arg5"); in test_bpf_syscall_macro() 77 ASSERT_EQ(skel->bss->splice_fd_in, -42, "splice_arg1"); in test_bpf_syscall_macro() 78 ASSERT_EQ(skel->bss->splice_off_in, (__u64)&off_in, "splice_arg2"); in test_bpf_syscall_macro() 79 ASSERT_EQ(skel->bss->splice_fd_out, 42, "splice_arg3"); in test_bpf_syscall_macro() [all …]
|
| A D | btf_skc_cls_ingress.c | 60 memset(&skel->bss->srv_sa6, 0, sizeof(skel->bss->srv_sa6)); in reset_test() 64 skel->bss->gen_cookie = 0; in reset_test() 65 skel->bss->linum = 0; in reset_test() 70 if (skel->bss->linum) in print_err_line() 106 skel->bss->listen_tp_sport, skel->bss->req_sk_sport, in test_conn() 110 if (CHECK(skel->bss->gen_cookie || skel->bss->recv_cookie, in test_conn() 113 skel->bss->gen_cookie, skel->bss->recv_cookie)) in test_conn() 117 skel->bss->linum); in test_conn() 170 skel->bss->gen_cookie != skel->bss->recv_cookie, in test_syncookie() 173 skel->bss->gen_cookie, skel->bss->recv_cookie)) in test_syncookie() [all …]
|
| A D | endian.c | 20 struct test_endian__bss *bss; in test_endian() local 26 bss = skel->bss; in test_endian() 28 bss->in16 = IN16; in test_endian() 29 bss->in32 = IN32; in test_endian() 30 bss->in64 = IN64; in test_endian() 39 (__u64)bss->out16, (__u64)OUT16); in test_endian() 41 (__u64)bss->out32, (__u64)OUT32); in test_endian() 43 (__u64)bss->out64, (__u64)OUT64); in test_endian() 46 (__u64)bss->const16, (__u64)OUT16); in test_endian() 48 (__u64)bss->const32, (__u64)OUT32); in test_endian() [all …]
|
| A D | setget_sockopt.c | 44 struct setget_sockopt__bss *bss = skel->bss; in test_tcp() local 47 memset(bss, 0, sizeof(*bss)); in test_tcp() 62 ASSERT_EQ(bss->nr_listen, 1, "nr_listen"); in test_tcp() 67 ASSERT_EQ(bss->nr_binddev, 2, "nr_bind"); in test_tcp() 72 struct setget_sockopt__bss *bss = skel->bss; in test_udp() local 75 memset(bss, 0, sizeof(*bss)); in test_udp() 84 ASSERT_EQ(bss->nr_binddev, 1, "nr_bind"); in test_udp() 90 struct setget_sockopt__bss *bss = skel->bss; in test_ktls() local 94 memset(bss, 0, sizeof(*bss)); in test_ktls() 159 struct setget_sockopt__bss *bss = skel->bss; in test_nonstandard_opt() local [all …]
|
| A D | test_ima.c | 59 bss->use_ima_file_hash = false; in test_init() 61 bss->enable_kernel_read_file = false; in test_init() 62 bss->test_deny = false; in test_init() 103 test_init(skel->bss); in test_test_ima() 117 test_init(skel->bss); in test_test_ima() 118 skel->bss->use_ima_file_hash = true; in test_test_ima() 142 test_init(skel->bss); in test_test_ima() 174 test_init(skel->bss); in test_test_ima() 204 test_init(skel->bss); in test_test_ima() 222 test_init(skel->bss); in test_test_ima() [all …]
|
| A D | uprobe_autoattach.c | 30 skel->bss->test_pid = getpid(); in test_uprobe_autoattach() 35 skel->bss->test_pid = getpid(); in test_uprobe_autoattach() 48 ASSERT_EQ(skel->bss->uretprobe_byname2_rc, (__u64)(long)devnull, in test_uprobe_autoattach() 52 ASSERT_EQ(skel->bss->a[0], 1, "arg1"); in test_uprobe_autoattach() 53 ASSERT_EQ(skel->bss->a[1], 2, "arg2"); in test_uprobe_autoattach() 54 ASSERT_EQ(skel->bss->a[2], 3, "arg3"); in test_uprobe_autoattach() 56 ASSERT_EQ(skel->bss->a[3], 4, "arg4"); in test_uprobe_autoattach() 59 ASSERT_EQ(skel->bss->a[4], 5, "arg5"); in test_uprobe_autoattach() 62 ASSERT_EQ(skel->bss->a[5], 6, "arg6"); in test_uprobe_autoattach() 65 ASSERT_EQ(skel->bss->a[6], 7, "arg7"); in test_uprobe_autoattach() [all …]
|
| A D | ringbuf.c | 71 skel->bss->dropped = 0; in trigger_samples() 72 skel->bss->total = 0; in trigger_samples() 73 skel->bss->discarded = 0; in trigger_samples() 76 skel->bss->value = 333; in trigger_samples() 78 skel->bss->value = 777; in trigger_samples() 124 skel->bss->discarded = 0; in ringbuf_write_subtest() 125 skel->bss->passed = 0; in ringbuf_write_subtest() 320 skel->bss->flags = 0; in ringbuf_subtest() 336 skel->bss->dropped = 0; in ringbuf_subtest() 337 skel->bss->total = 0; in ringbuf_subtest() [all …]
|
| A D | bpf_loop.c | 17 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() 52 skel->bss->nr_loops = 400; 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() 110 skel->bss->nr_loops = nr_loops; in check_nested_calls() 131 skel->bss->callback_selector = 0x0F; in check_non_constant_callback() [all …]
|
| A D | bpf_cookie.c | 115 skel->bss->pid = getpid(); in kprobe_multi_link_api_subtest() 199 skel->bss->pid = getpid(); in kprobe_multi_attach_api_subtest() 255 skel->bss->pid = getpid(); in uprobe_multi_test_run() 404 skel->bss->tp_res = 0; in tp_subtest() 476 skel->bss->pe_res = 0; in pe_subtest() 500 skel->bss->fentry_res = 0; in tracing_subtest() 501 skel->bss->fexit_res = 0; in tracing_subtest() 553 skel->bss->lsm_res = 0; in lsm_subtest() 591 skel->bss->tp_btf_res = 0; in tp_btf_subtest() 605 skel->bss->tp_btf_res = 0; in tp_btf_subtest() [all …]
|
| A D | link_pinning.c | 12 struct test_link_pinning__bss *bss) in test_link_pinning_subtest() argument 23 bss->in = 1; in test_link_pinning_subtest() 25 CHECK(bss->out != 1, "res_check1", "exp %d, got %d\n", 1, bss->out); in test_link_pinning_subtest() 40 bss->in = 2; in test_link_pinning_subtest() 42 CHECK(bss->out != 2, "res_check2", "exp %d, got %d\n", 2, bss->out); in test_link_pinning_subtest() 48 bss->in = 3; in test_link_pinning_subtest() 50 CHECK(bss->out != 3, "res_check3", "exp %d, got %d\n", 3, bss->out); in test_link_pinning_subtest() 66 bss->in = 4; in test_link_pinning_subtest() 68 CHECK(bss->out != 4, "res_check4", "exp %d, got %d\n", 4, bss->out); in test_link_pinning_subtest() 79 bss->in = i; in test_link_pinning_subtest() [all …]
|
| A D | map_ops.c | 84 ASSERT_OK(skel->bss->err, "map_update_initial"); in map_ops_update_delete_subtest() 87 ASSERT_LT(skel->bss->err, 0, "map_update_existing"); in map_ops_update_delete_subtest() 91 ASSERT_OK(skel->bss->err, "map_delete_existing"); in map_ops_update_delete_subtest() 94 ASSERT_LT(skel->bss->err, 0, "map_delete_non_existing"); in map_ops_update_delete_subtest() 109 ASSERT_OK(skel->bss->err, "map_push_initial"); in map_ops_push_peek_pop_subtest() 112 ASSERT_LT(skel->bss->err, 0, "map_push_when_full"); in map_ops_push_peek_pop_subtest() 116 ASSERT_OK(skel->bss->err, "map_peek"); in map_ops_push_peek_pop_subtest() 119 ASSERT_OK(skel->bss->err, "map_pop"); in map_ops_push_peek_pop_subtest() 122 ASSERT_LT(skel->bss->err, 0, "map_peek_when_empty"); in map_ops_push_peek_pop_subtest() 126 ASSERT_LT(skel->bss->err, 0, "map_pop_when_empty"); in map_ops_push_peek_pop_subtest() [all …]
|
| A D | snprintf.c | 46 skel->bss->pid = getpid(); in test_snprintf_positive() 54 ASSERT_STREQ(skel->bss->num_out, EXP_NUM_OUT, "num_out"); in test_snprintf_positive() 55 ASSERT_EQ(skel->bss->num_ret, EXP_NUM_RET, "num_ret"); in test_snprintf_positive() 57 ASSERT_STREQ(skel->bss->ip_out, EXP_IP_OUT, "ip_out"); in test_snprintf_positive() 58 ASSERT_EQ(skel->bss->ip_ret, EXP_IP_RET, "ip_ret"); in test_snprintf_positive() 60 ASSERT_OK(memcmp(skel->bss->sym_out, exp_sym_out, in test_snprintf_positive() 62 ASSERT_LT(MIN_SYM_RET, skel->bss->sym_ret, "sym_ret"); in test_snprintf_positive() 64 ASSERT_OK(memcmp(skel->bss->addr_out, exp_addr_out, in test_snprintf_positive() 66 ASSERT_EQ(skel->bss->addr_ret, EXP_ADDR_RET, "addr_ret"); in test_snprintf_positive() 69 ASSERT_EQ(skel->bss->str_ret, EXP_STR_RET, "str_ret"); in test_snprintf_positive() [all …]
|
| A D | module_attach.c | 41 struct test_module_attach__bss *bss; in test_module_attach() local 62 bss = skel->bss; in test_module_attach() 72 ASSERT_EQ(bss->raw_tp_read_sz, READ_SZ, "raw_tp"); in test_module_attach() 74 ASSERT_EQ(bss->tp_btf_read_sz, READ_SZ, "tp_btf"); in test_module_attach() 75 ASSERT_EQ(bss->fentry_read_sz, READ_SZ, "fentry"); in test_module_attach() 79 ASSERT_EQ(bss->fexit_read_sz, READ_SZ, "fexit"); in test_module_attach() 80 ASSERT_EQ(bss->fexit_ret, -EIO, "fexit_tet"); in test_module_attach() 81 ASSERT_EQ(bss->fmod_ret_read_sz, READ_SZ, "fmod_ret"); in test_module_attach() 83 bss->raw_tp_writable_bare_early_ret = true; in test_module_attach() 84 bss->raw_tp_writable_bare_out_val = 0xf1f2f3f4; in test_module_attach() [all …]
|
| A D | ns_current_pid_tgid.c | 21 struct test_ns_current_pid_tgid__bss *bss) in get_pid_tgid() argument 33 bss->dev = st.st_dev; in get_pid_tgid() 34 bss->ino = st.st_ino; in get_pid_tgid() 35 bss->user_pid = 0; in get_pid_tgid() 36 bss->user_tgid = 0; in get_pid_tgid() 42 struct test_ns_current_pid_tgid__bss *bss; in test_current_pid_tgid_tp() local 57 bss = skel->bss; in test_current_pid_tgid_tp() 58 if (get_pid_tgid(&pid, &tgid, bss)) in test_current_pid_tgid_tp() 96 bss = skel->bss; in test_current_pid_tgid_cgrp() 97 if (get_pid_tgid(&pid, &tgid, bss)) in test_current_pid_tgid_cgrp() [all …]
|
| A D | core_read_macros.c | 27 struct test_core_read_macros__bss *bss; in test_core_read_macros() local 34 bss = skel->bss; in test_core_read_macros() 35 bss->my_pid = getpid(); in test_core_read_macros() 38 bss->k_probe_in.func = (void *)(long)0x1234; in test_core_read_macros() 39 bss->k_core_in.func = (void *)(long)0xabcd; in test_core_read_macros() 43 bss->u_probe_in = &u_probe_in; in test_core_read_macros() 47 bss->u_core_in = &u_core_in; in test_core_read_macros() 56 ASSERT_EQ(bss->k_probe_out, 0x1234, "k_probe_out"); in test_core_read_macros() 57 ASSERT_EQ(bss->k_core_out, 0xabcd, "k_core_out"); in test_core_read_macros() 59 ASSERT_EQ(bss->u_probe_out, 0x5678, "u_probe_out"); in test_core_read_macros() [all …]
|
| A D | cgroup_getset_retval.c | 28 obj->bss->page_size = sysconf(_SC_PAGESIZE); in test_setsockopt_set() 44 if (!ASSERT_EQ(obj->bss->invocations, 1, "invocations")) in test_setsockopt_set() 64 obj->bss->page_size = sysconf(_SC_PAGESIZE); in test_setsockopt_set_and_get() 107 obj->bss->page_size = sysconf(_SC_PAGESIZE); in test_setsockopt_default_zero() 143 obj->bss->page_size = sysconf(_SC_PAGESIZE); in test_setsockopt_default_zero_and_set() 188 obj->bss->page_size = sysconf(_SC_PAGESIZE); in test_setsockopt_override() 237 obj->bss->page_size = sysconf(_SC_PAGESIZE); in test_setsockopt_legacy_eperm() 283 obj->bss->page_size = sysconf(_SC_PAGESIZE); in test_setsockopt_legacy_no_override() 336 obj->bss->page_size = sysconf(_SC_PAGESIZE); in test_getsockopt_get() 378 obj->bss->page_size = sysconf(_SC_PAGESIZE); in test_getsockopt_override() [all …]
|
| A D | d_path.c | 123 struct test_d_path__bss *bss; in test_d_path_basic() local 135 bss = skel->bss; in test_d_path_basic() 136 bss->my_pid = getpid(); in test_d_path_basic() 142 if (CHECK(!bss->called_stat, in test_d_path_basic() 147 if (CHECK(!bss->called_close, in test_d_path_basic() 162 CHECK(bss->rets_stat[i] != strlen(bss->paths_stat[i]) + 1, in test_d_path_basic() 165 i, bss->rets_stat[i], strlen(bss->paths_stat[i]) + 1, in test_d_path_basic() 166 bss->paths_stat[i]); in test_d_path_basic() 167 CHECK(bss->rets_close[i] != strlen(bss->paths_stat[i]) + 1, in test_d_path_basic() 170 i, bss->rets_close[i], strlen(bss->paths_close[i]) + 1, in test_d_path_basic() [all …]
|
| A D | cgroup1_hierarchy.c | 79 skel->bss->target_pid = getpid(); in test_cgroup1_hierarchy() 108 skel->bss->target_hid = hid; in test_cgroup1_hierarchy() 116 skel->bss->target_ancestor_cgid = 1; in test_cgroup1_hierarchy() 117 skel->bss->target_ancestor_level = 0; in test_cgroup1_hierarchy() 122 skel->bss->target_ancestor_cgid = 1; in test_cgroup1_hierarchy() 123 skel->bss->target_ancestor_level = 1; in test_cgroup1_hierarchy() 128 skel->bss->target_ancestor_cgid = 0; in test_cgroup1_hierarchy() 133 skel->bss->target_ancestor_cgid = 1; in test_cgroup1_hierarchy() 134 skel->bss->target_ancestor_level = 0; in test_cgroup1_hierarchy() 135 skel->bss->target_hid = -1; in test_cgroup1_hierarchy() [all …]
|
| A D | atomics.c | 21 ASSERT_EQ(skel->bss->add64_result, 1, "add64_result"); in test_add() 24 ASSERT_EQ(skel->bss->add32_result, 1, "add32_result"); in test_add() 27 ASSERT_EQ(skel->bss->add_stack_result, 1, "add_stack_result"); in test_add() 46 ASSERT_EQ(skel->bss->sub64_result, 1, "sub64_result"); in test_sub() 49 ASSERT_EQ(skel->bss->sub32_result, 1, "sub32_result"); in test_sub() 74 ASSERT_EQ(skel->bss->and32_result, 0x110, "and32_result"); in test_and() 96 ASSERT_EQ(skel->bss->or32_result, 0x110, "or32_result"); in test_or() 118 ASSERT_EQ(skel->bss->xor32_result, 0x110, "xor32_result"); in test_xor() 159 ASSERT_EQ(skel->bss->xchg64_result, 1, "xchg64_result"); in test_xchg() 162 ASSERT_EQ(skel->bss->xchg32_result, 1, "xchg32_result"); in test_xchg() [all …]
|
| A D | uretprobe_stack.c | 148 validate_stack(skel->bss->entry_stack1, skel->bss->entry1_len, in test_uretprobe_stack() 151 validate_stack(skel->bss->entry_stack1_recur, skel->bss->entry1_recur_len, in test_uretprobe_stack() 154 validate_stack(skel->bss->entry_stack2, skel->bss->entry2_len, in test_uretprobe_stack() 157 validate_stack(skel->bss->entry_stack3, skel->bss->entry3_len, in test_uretprobe_stack() 160 validate_stack(skel->bss->entry_stack4, skel->bss->entry4_len, in test_uretprobe_stack() 166 validate_stack(skel->bss->usdt_stack, skel->bss->usdt_len, in test_uretprobe_stack() 174 validate_stack(skel->bss->exit_stack4, skel->bss->exit4_len, in test_uretprobe_stack() 178 validate_stack(skel->bss->exit_stack1_recur, skel->bss->exit1_recur_len, in test_uretprobe_stack() 181 validate_stack(skel->bss->exit_stack1, skel->bss->exit1_len, in test_uretprobe_stack()
|
| A D | iters.c | 42 ASSERT_EQ(skel->bss->res_##case_name, \ in subtest_num_iters() 92 ASSERT_EQ(skel->bss->res_##case_name, \ in subtest_testmod_seq_iters() 119 skel->bss->target_pid = getpid(); in subtest_task_vma_iters() 125 getpgid(skel->bss->target_pid); in subtest_task_vma_iters() 145 bpf_iter_end = skel->bss->vm_ranges[seen].vm_end; in subtest_task_vma_iters() 183 skel->bss->target_pid = getpid(); in subtest_task_iters() 194 ASSERT_EQ(skel->bss->procs_cnt, 1, "procs_cnt"); in subtest_task_iters() 228 skel->bss->target_pid = getpid(); in subtest_css_task_iters() 229 skel->bss->cg_id = cg_id; in subtest_css_task_iters() 273 skel->bss->target_pid = getpid(); in subtest_css_iters() [all …]
|
| /linux/tools/sched_ext/ |
| A D | scx_qmap.c | 125 skel->bss->nr_reenqueued, skel->bss->nr_dequeued, in main() 126 skel->bss->nr_core_sched_execed, in main() 127 skel->bss->nr_ddsp_from_enq); in main() 129 skel->bss->nr_expedited_local, in main() 130 skel->bss->nr_expedited_remote, in main() 132 skel->bss->nr_expedited_lost); in main() 135 skel->bss->cpuperf_min, in main() 136 skel->bss->cpuperf_avg, in main() 137 skel->bss->cpuperf_max, in main() 138 skel->bss->cpuperf_target_min, in main() [all …]
|