/kernel/linux/linux-6.6/tools/testing/selftests/bpf/prog_tests/ |
H A D | log_buf.c | 40 if (!ASSERT_OK_PTR(obj_log_buf, "obj_log_buf")) in obj_load_log_buf() 55 if (!ASSERT_OK_PTR(skel, "skel_open")) in obj_load_log_buf() 78 ASSERT_OK_PTR(strstr(libbpf_log_buf, "prog 'bad_prog': BPF program load failed"), in obj_load_log_buf() 80 ASSERT_OK_PTR(strstr(obj_log_buf, "DATASEC license"), "obj_log_not_empty"); in obj_load_log_buf() 81 ASSERT_OK_PTR(strstr(good_log_buf, "0: R1=ctx(off=0,imm=0) R10=fp0"), in obj_load_log_buf() 83 ASSERT_OK_PTR(strstr(bad_log_buf, "invalid access to map value, value_size=16 off=16000 size=4"), in obj_load_log_buf() 106 if (!ASSERT_OK_PTR(skel, "skel_open")) in obj_load_log_buf() 120 ASSERT_OK_PTR(strstr(libbpf_log_buf, "libbpf: prog 'bad_prog': -- BEGIN PROG LOAD LOG --"), in obj_load_log_buf() 157 if (!ASSERT_OK_PTR(log_buf, "log_buf_alloc")) in bpf_prog_load_log_buf() 178 ASSERT_OK_PTR(strst in bpf_prog_load_log_buf() [all...] |
H A D | cgroup_getset_retval.c | 25 if (!ASSERT_OK_PTR(obj, "skel-load")) in test_setsockopt_set() 35 if (!ASSERT_OK_PTR(link_set_eunatch, "cg-attach-set_eunatch")) in test_setsockopt_set() 61 if (!ASSERT_OK_PTR(obj, "skel-load")) in test_setsockopt_set_and_get() 71 if (!ASSERT_OK_PTR(link_set_eunatch, "cg-attach-set_eunatch")) in test_setsockopt_set_and_get() 75 if (!ASSERT_OK_PTR(link_get_retval, "cg-attach-get_retval")) in test_setsockopt_set_and_get() 104 if (!ASSERT_OK_PTR(obj, "skel-load")) in test_setsockopt_default_zero() 114 if (!ASSERT_OK_PTR(link_get_retval, "cg-attach-get_retval")) in test_setsockopt_default_zero() 140 if (!ASSERT_OK_PTR(obj, "skel-load")) in test_setsockopt_default_zero_and_set() 151 if (!ASSERT_OK_PTR(link_get_retval, "cg-attach-get_retval")) in test_setsockopt_default_zero_and_set() 155 if (!ASSERT_OK_PTR(link_set_eunatc in test_setsockopt_default_zero_and_set() [all...] |
H A D | attach_probe.c | 47 if (!ASSERT_OK_PTR(skel, "skel_kprobe_manual_open_and_load")) in test_attach_probe_manual() 60 if (!ASSERT_OK_PTR(kprobe_link, "attach_kprobe")) in test_attach_probe_manual() 68 if (!ASSERT_OK_PTR(kretprobe_link, "attach_kretprobe")) in test_attach_probe_manual() 81 if (!ASSERT_OK_PTR(uprobe_link, "attach_uprobe")) in test_attach_probe_manual() 90 if (!ASSERT_OK_PTR(uretprobe_link, "attach_uretprobe")) in test_attach_probe_manual() 103 if (!ASSERT_OK_PTR(skel->links.handle_uprobe_byname, "attach_uprobe_byname")) in test_attach_probe_manual() 131 ASSERT_OK_PTR(skel->links.handle_kprobe_auto, "attach_kprobe_auto"); in test_attach_probe_auto() 134 ASSERT_OK_PTR(skel->links.handle_kretprobe_auto, "attach_kretprobe_auto"); in test_attach_probe_auto() 145 if (!ASSERT_OK_PTR(skel->links.handle_uretprobe_byname, "attach_uretprobe_byname")) in test_attach_probe_auto() 174 if (!ASSERT_OK_PTR(ske in test_uprobe_lib() [all...] |
H A D | core_autosize.c | 67 if (!ASSERT_OK_PTR(btf, "empty_btf")) in test_core_autosize() 112 if (!ASSERT_OK_PTR(f, "btf_fdopen")) in test_core_autosize() 116 if (!ASSERT_OK_PTR(raw_data, "raw_data")) in test_core_autosize() 130 if (!ASSERT_OK_PTR(skel, "skel_open")) in test_core_autosize() 135 if (!ASSERT_OK_PTR(prog, "prog_find")) in test_core_autosize() 144 if (!ASSERT_OK_PTR(prog, "prog_find")) in test_core_autosize() 147 if (!ASSERT_OK_PTR(skel->links.handle_samesize, "prog_attach")) in test_core_autosize() 151 if (!ASSERT_OK_PTR(prog, "prog_find")) in test_core_autosize() 154 if (!ASSERT_OK_PTR(skel->links.handle_downsize, "prog_attach")) in test_core_autosize() 158 if (!ASSERT_OK_PTR(pro in test_core_autosize() [all...] |
H A D | bpf_tcp_ca.c | 181 if (!ASSERT_OK_PTR(link, "bpf_map__attach_struct_ops")) { in test_cubic() 204 if (!ASSERT_OK_PTR(link, "bpf_map__attach_struct_ops")) { in test_dctcp() 272 if (!ASSERT_OK_PTR(dctcp_skel, "dctcp_skel")) in test_dctcp_fallback() 279 if (!ASSERT_OK_PTR(link, "dctcp link")) in test_dctcp_fallback() 341 if (!ASSERT_OK_PTR(skel, "open_and_load")) in test_write_sk_pacing() 345 ASSERT_OK_PTR(link, "attach_struct_ops"); in test_write_sk_pacing() 357 if (!ASSERT_OK_PTR(skel, "open_and_load")) in test_incompl_cong_ops() 395 if (!ASSERT_OK_PTR(skel, "open")) in test_update_ca() 399 ASSERT_OK_PTR(link, "attach_struct_ops"); in test_update_ca() 424 if (!ASSERT_OK_PTR(ske in test_update_wrong() [all...] |
H A D | uprobe_multi_test.c | 139 if (!ASSERT_OK_PTR(skel, "uprobe_multi__open_and_load")) in test_skel_api() 160 if (!ASSERT_OK_PTR(skel, "uprobe_multi__open_and_load")) in __test_attach_api() 166 if (!ASSERT_OK_PTR(skel->links.uprobe, "bpf_program__attach_uprobe_multi")) in __test_attach_api() 172 if (!ASSERT_OK_PTR(skel->links.uretprobe, "bpf_program__attach_uprobe_multi")) in __test_attach_api() 178 if (!ASSERT_OK_PTR(skel->links.uprobe_sleep, "bpf_program__attach_uprobe_multi")) in __test_attach_api() 184 if (!ASSERT_OK_PTR(skel->links.uretprobe_sleep, "bpf_program__attach_uprobe_multi")) in __test_attach_api() 190 if (!ASSERT_OK_PTR(skel->links.uprobe_extra, "bpf_program__attach_uprobe_multi")) in __test_attach_api() 209 if (!ASSERT_OK_PTR(child, "spawn_child")) in test_attach_api() 262 if (!ASSERT_OK_PTR(skel, "uprobe_multi__open_and_load")) in __test_link_api() 323 if (!ASSERT_OK_PTR(chil in test_link_api() [all...] |
H A D | btf_split.c | 22 if (!ASSERT_OK_PTR(btf1, "empty_main_btf")) in test_btf_split() 35 if (!ASSERT_OK_PTR(btf2, "empty_split_btf")) in test_btf_split() 45 if (!ASSERT_OK_PTR(t, "int_type")) in test_btf_split() 60 if (!ASSERT_OK_PTR(t, "split_struct_type")) in test_btf_split() 68 if (!ASSERT_OK_PTR(dump_buf_file, "dump_memstream")) in test_btf_split() 71 if (!ASSERT_OK_PTR(d, "btf_dump__new")) in test_btf_split()
|
H A D | cgrp_local_storage.c | 29 if (!ASSERT_OK_PTR(skel, "skel_open_and_load")) in test_tp_btf() 78 if (!ASSERT_OK_PTR(skel, "skel_open")) in test_attach_cgroup() 83 if (!ASSERT_OK_PTR(skel->links.set_cookie, "prog_attach")) in test_attach_cgroup() 88 if (!ASSERT_OK_PTR(skel->links.update_cookie_sockops, "prog_attach")) in test_attach_cgroup() 93 if (!ASSERT_OK_PTR(skel->links.update_cookie_tracing, "prog_attach")) in test_attach_cgroup() 130 if (!ASSERT_OK_PTR(skel, "skel_open_and_load")) in test_recursion() 165 if (!ASSERT_OK_PTR(skel, "skel_open")) in test_cgroup_iter_sleepable() 179 if (!ASSERT_OK_PTR(link, "attach_iter")) in test_cgroup_iter_sleepable() 202 if (!ASSERT_OK_PTR(skel, "skel_open")) in test_yes_rcu_lock() 229 if (!ASSERT_OK_PTR(ske in test_no_rcu_lock() [all...] |
H A D | btf_endian.c | 27 if (!ASSERT_OK_PTR(btf, "parse_native_btf")) in test_btf_endian() 36 if (!ASSERT_OK_PTR(raw_data, "raw_data_inverted")) in test_btf_endian() 41 if (!ASSERT_OK_PTR(swap_btf, "parse_swap_btf")) in test_btf_endian() 48 if (!ASSERT_OK_PTR(swap_raw_data, "swap_raw_data")) in test_btf_endian() 62 if (!ASSERT_OK_PTR(swap_raw_data, "swap_raw_data")) in test_btf_endian() 79 if (!ASSERT_OK_PTR(raw_data, "raw_data_inverted")) in test_btf_endian() 84 if (!ASSERT_OK_PTR(swap_btf, "parse_swap_btf")) in test_btf_endian()
|
H A D | bpf_iter_setsockopt.c | 126 if (!ASSERT_OK_PTR(est_fds, "create established")) in do_bpf_iter_setsockopt() 133 if (!ASSERT_OK_PTR(reuse_listen_fds, "start_reuseport_server")) in do_bpf_iter_setsockopt() 195 if (!ASSERT_OK_PTR(iter_skel, "iter_skel")) in serial_test_bpf_iter_setsockopt() 198 if (!ASSERT_OK_PTR(iter_skel->links.change_tcp_cc, "attach iter")) in serial_test_bpf_iter_setsockopt() 203 if (!ASSERT_OK_PTR(cubic_skel, "cubic_skel")) in serial_test_bpf_iter_setsockopt() 206 if (!ASSERT_OK_PTR(cubic_link, "cubic_link")) in serial_test_bpf_iter_setsockopt() 211 if (!ASSERT_OK_PTR(dctcp_skel, "dctcp_skel")) in serial_test_bpf_iter_setsockopt() 214 if (!ASSERT_OK_PTR(dctcp_link, "dctcp_link")) in serial_test_bpf_iter_setsockopt()
|
H A D | bpf_loop.c | 13 if (!ASSERT_OK_PTR(link, "link")) in check_nr_loops() 48 if (!ASSERT_OK_PTR(link, "link")) in check_callback_fn_stop() 71 if (!ASSERT_OK_PTR(link, "link")) in check_null_callback_ctx() 90 if (!ASSERT_OK_PTR(link, "link")) in check_invalid_flags() 107 if (!ASSERT_OK_PTR(link, "link")) in check_nested_calls() 128 if (!ASSERT_OK_PTR(link, "link")) in check_non_constant_callback() 149 if (!ASSERT_OK_PTR(link, "link")) in check_stack() 186 if (!ASSERT_OK_PTR(skel, "bpf_loop__open_and_load")) in test_bpf_loop()
|
H A D | btf_tag.c | 20 if (!ASSERT_OK_PTR(skel, "btf_decl_tag")) in test_btf_decl_tag() 36 if (!ASSERT_OK_PTR(skel, "btf_type_tag")) in test_btf_type_tag() 66 if (!ASSERT_OK_PTR(*vmlinux_btf, "could not load vmlinux BTF")) in load_btfs() 86 if (!ASSERT_OK_PTR(*module_btf, "could not load module BTF")) in load_btfs() 120 if (!ASSERT_OK_PTR(skel, "btf_type_tag_user")) in test_btf_type_tag_mod_user() 149 if (!ASSERT_OK_PTR(skel, "btf_type_tag_user")) in test_btf_type_tag_vmlinux_user() 174 if (!ASSERT_OK_PTR(skel, "btf_type_tag_percpu")) in test_btf_type_tag_mod_percpu() 204 if (!ASSERT_OK_PTR(skel, "btf_type_tag_percpu")) in test_btf_type_tag_vmlinux_percpu()
|
H A D | libbpf_str.c | 29 if (!ASSERT_OK_PTR(btf, "btf_parse")) in test_libbpf_bpf_attach_type_str() 50 ASSERT_OK_PTR(attach_type_str, attach_type_name); in test_libbpf_bpf_attach_type_str() 74 if (!ASSERT_OK_PTR(btf, "btf_parse")) in test_libbpf_bpf_link_type_str() 95 ASSERT_OK_PTR(link_type_str, link_type_name); in test_libbpf_bpf_link_type_str() 119 if (!ASSERT_OK_PTR(btf, "btf_parse")) in test_libbpf_bpf_map_type_str() 137 ASSERT_OK_PTR(map_type_str, map_type_name); in test_libbpf_bpf_map_type_str() 169 if (!ASSERT_OK_PTR(btf, "btf_parse")) in test_libbpf_bpf_prog_type_str() 187 ASSERT_OK_PTR(prog_type_str, prog_type_name); in test_libbpf_bpf_prog_type_str()
|
H A D | bpf_cookie.c | 33 if (!ASSERT_OK_PTR(link1, "link1")) in kprobe_subtest() 40 if (!ASSERT_OK_PTR(link2, "link2")) in kprobe_subtest() 48 if (!ASSERT_OK_PTR(retlink1, "retlink1")) in kprobe_subtest() 55 if (!ASSERT_OK_PTR(retlink2, "retlink2")) in kprobe_subtest() 112 if (!ASSERT_OK_PTR(skel, "fentry_raw_skel_load")) in kprobe_multi_link_api_subtest() 196 if (!ASSERT_OK_PTR(skel, "fentry_raw_skel_load")) in kprobe_multi_attach_api_subtest() 217 if (!ASSERT_OK_PTR(link1, "bpf_program__attach_kprobe_multi_opts")) in kprobe_multi_attach_api_subtest() 233 if (!ASSERT_OK_PTR(link2, "bpf_program__attach_kprobe_multi_opts")) in kprobe_multi_attach_api_subtest() 292 if (!ASSERT_OK_PTR(skel, "uprobe_multi")) in uprobe_multi_attach_api_subtest() 297 if (!ASSERT_OK_PTR(link in uprobe_multi_attach_api_subtest() [all...] |
H A D | btf_dedup_split.c | 13 if (!ASSERT_OK_PTR(btf1, "empty_main_btf")) in test_split_simple() 37 if (!ASSERT_OK_PTR(btf2, "empty_split_btf")) in test_split_simple() 47 if (!ASSERT_OK_PTR(t, "int_type")) in test_split_simple() 131 if (!ASSERT_OK_PTR(btf1, "empty_main_btf")) in test_split_fwd_resolve() 165 if (!ASSERT_OK_PTR(btf2, "empty_split_btf")) in test_split_fwd_resolve() 229 if (!ASSERT_OK_PTR(btf1, "empty_main_btf")) in test_split_struct_duped() 254 if (!ASSERT_OK_PTR(btf2, "empty_split_btf")) in test_split_struct_duped() 363 if (!ASSERT_OK_PTR(btf1, "empty_main_btf")) in test_split_dup_struct_in_cu() 398 if (!ASSERT_OK_PTR(btf2, "empty_split_btf")) in test_split_dup_struct_in_cu()
|
H A D | linked_list.c | 111 if (!ASSERT_OK_PTR(skel, "linked_list_fail__open_opts")) in test_linked_list_fail_prog() 115 if (!ASSERT_OK_PTR(prog, "bpf_object__find_program_by_name")) in test_linked_list_fail_prog() 124 if (!ASSERT_OK_PTR(strstr(log_buf, err_msg), "expected error message")) { in test_linked_list_fail_prog() 160 if (!ASSERT_OK_PTR(skel, "linked_list__open_and_load")) in test_linked_list_success() 243 if (!ASSERT_OK_PTR(btf, "btf__new_empty")) in init_btf() 270 if (!ASSERT_OK_PTR(btf, "init_btf")) in list_and_rb_node_same_struct() 323 if (!ASSERT_OK_PTR(btf, "init_btf")) in test_btf() 346 if (!ASSERT_OK_PTR(btf, "init_btf")) in test_btf() 372 if (!ASSERT_OK_PTR(btf, "init_btf")) in test_btf() 398 if (!ASSERT_OK_PTR(bt in test_btf() [all...] |
H A D | fexit_bpf2bpf.c | 90 if (!ASSERT_OK_PTR(link, "link_ptr")) in test_fexit_bpf2bpf_common() 94 if (!ASSERT_OK_PTR(prog, "prog_ptr")) in test_fexit_bpf2bpf_common() 98 if (!ASSERT_OK_PTR(obj, "obj_open")) in test_fexit_bpf2bpf_common() 118 if (!ASSERT_OK_PTR(tgt_name, "tgt_name")) in test_fexit_bpf2bpf_common() 130 if (!ASSERT_OK_PTR(prog[i], prog_name[i])) in test_fexit_bpf2bpf_common() 134 if (!ASSERT_OK_PTR(link[i], "attach_trace")) in test_fexit_bpf2bpf_common() 244 if (!ASSERT_OK_PTR(prog, "find_prog")) in test_second_attach() 253 if (!ASSERT_OK_PTR(link, "second_link")) in test_second_attach() 303 if (!ASSERT_OK_PTR(freplace_obj, "freplace_obj_open")) in test_fmod_ret_freplace() 315 if (!ASSERT_OK_PTR(freplace_lin in test_fmod_ret_freplace() [all...] |
H A D | subskeleton.c | 12 if (!ASSERT_OK_PTR(lib, "open subskeleton")) in subskeleton_lib_setup() 28 if (!ASSERT_OK_PTR(lib, "open subskeleton")) in subskeleton_lib_subresult() 34 ASSERT_OK_PTR(lib->progs.lib_perf_handler, "lib_perf_handler"); in subskeleton_lib_subresult() 38 ASSERT_OK_PTR(lib->maps.map1, "map1"); in subskeleton_lib_subresult() 55 if (!ASSERT_OK_PTR(skel, "skel_open")) in test_subskeleton()
|
H A D | cpumask.c | 32 if (!ASSERT_OK_PTR(skel, "cpumask_success__open")) in verify_success() 39 if (!ASSERT_OK_PTR(skel, "cpumask_success__load")) in verify_success() 43 if (!ASSERT_OK_PTR(prog, "bpf_object__find_program_by_name")) in verify_success() 47 if (!ASSERT_OK_PTR(link, "bpf_program__attach")) in verify_success()
|
H A D | dummy_st_ops.c | 19 if (!ASSERT_OK_PTR(skel, "dummy_st_ops_load")) in test_dummy_st_ops_attach() 39 if (!ASSERT_OK_PTR(skel, "dummy_st_ops_load")) in test_dummy_init_ret_value() 66 if (!ASSERT_OK_PTR(skel, "dummy_st_ops_load")) in test_dummy_init_ptr_arg() 72 if (!ASSERT_OK_PTR(trace_skel, "trace_dummy_st_ops__open")) in test_dummy_init_ptr_arg() 112 if (!ASSERT_OK_PTR(skel, "dummy_st_ops_load")) in test_dummy_multiple_args() 137 if (!ASSERT_OK_PTR(skel, "dummy_st_ops_load")) in test_dummy_sleepable()
|
H A D | rcu_read_lock.c | 21 if (!ASSERT_OK_PTR(skel, "skel_open")) in test_success() 54 if (!ASSERT_OK_PTR(skel, "skel_open")) in test_rcuptr_acquire() 88 if (!ASSERT_OK_PTR(skel, "skel_open")) in test_inproper_region() 92 if (!ASSERT_OK_PTR(prog, "bpf_object__find_program_by_name")) in test_inproper_region() 115 if (!ASSERT_OK_PTR(skel, "skel_open")) in test_rcuptr_misuse() 119 if (!ASSERT_OK_PTR(prog, "bpf_object__find_program_by_name")) in test_rcuptr_misuse()
|
H A D | test_overhead.c | 76 if (!ASSERT_OK_PTR(obj, "obj_open_file")) in test_test_overhead() 111 if (!ASSERT_OK_PTR(link, "attach_kprobe")) in test_test_overhead() 119 if (!ASSERT_OK_PTR(link, "attach_kretprobe")) in test_test_overhead() 126 if (!ASSERT_OK_PTR(link, "attach_raw_tp")) in test_test_overhead() 133 if (!ASSERT_OK_PTR(link, "attach_fentry")) in test_test_overhead() 140 if (!ASSERT_OK_PTR(link, "attach_fexit")) in test_test_overhead()
|
H A D | bpf_iter.c | 57 if (!ASSERT_OK_PTR(link, "attach_iter")) in do_dummy_read_opts() 94 if (!ASSERT_OK_PTR(link, "attach_map_iter")) in do_read_map_iter_fd() 145 if (!ASSERT_OK_PTR(skel, "bpf_iter_ipv6_route__open_and_load")) in test_ipv6_route() 158 if (!ASSERT_OK_PTR(skel, "bpf_iter_netlink__open_and_load")) in test_netlink() 171 if (!ASSERT_OK_PTR(skel, "bpf_iter_bpf_map__open_and_load")) in test_bpf_map() 194 if (!ASSERT_OK_PTR(link, "attach_iter")) in check_bpf_link_info() 223 if (!ASSERT_OK_PTR(skel, "bpf_iter_task__open_and_load")) in test_task_common_nocheck() 313 if (!ASSERT_OK_PTR(skel, "bpf_iter_task__open_and_load")) in test_task_sleepable() 331 if (!ASSERT_OK_PTR(skel, "bpf_iter_task_stack__open_and_load")) in test_task_stack() 351 if (!ASSERT_OK_PTR(ske in test_task_file() [all...] |
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/prog_tests/ |
H A D | core_autosize.c | 67 if (!ASSERT_OK_PTR(btf, "empty_btf")) in test_core_autosize() 112 if (!ASSERT_OK_PTR(f, "btf_fdopen")) in test_core_autosize() 116 if (!ASSERT_OK_PTR(raw_data, "raw_data")) in test_core_autosize() 129 if (!ASSERT_OK_PTR(skel, "skel_open")) in test_core_autosize() 134 if (!ASSERT_OK_PTR(prog, "prog_find")) in test_core_autosize() 145 if (!ASSERT_OK_PTR(prog, "prog_find")) in test_core_autosize() 148 if (!ASSERT_OK_PTR(skel->links.handle_samesize, "prog_attach")) in test_core_autosize() 152 if (!ASSERT_OK_PTR(prog, "prog_find")) in test_core_autosize() 155 if (!ASSERT_OK_PTR(skel->links.handle_downsize, "prog_attach")) in test_core_autosize() 159 if (!ASSERT_OK_PTR(pro in test_core_autosize() [all...] |
H A D | btf_endian.c | 29 if (!ASSERT_OK_PTR(btf, "parse_native_btf")) in test_btf_endian() 38 if (!ASSERT_OK_PTR(raw_data, "raw_data_inverted")) in test_btf_endian() 43 if (!ASSERT_OK_PTR(swap_btf, "parse_swap_btf")) in test_btf_endian() 50 if (!ASSERT_OK_PTR(swap_raw_data, "swap_raw_data")) in test_btf_endian() 64 if (!ASSERT_OK_PTR(swap_raw_data, "swap_raw_data")) in test_btf_endian() 81 if (!ASSERT_OK_PTR(raw_data, "raw_data_inverted")) in test_btf_endian() 86 if (!ASSERT_OK_PTR(swap_btf, "parse_swap_btf")) in test_btf_endian()
|