/linux/tools/testing/selftests/bpf/prog_tests/ |
H A D | exceptions.c | 37 &(int){bpf_program__fd(skel->progs.exception_tail_call_target)}, BPF_ANY), in test_exceptions_success() 43 ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs._prog), &ropts); \ in test_exceptions_success() 127 bpf_program__fd(skel->progs.exception_ext_mod_cb_runtime), in test_exceptions_success() 137 bpf_program__fd(skel->progs.exception_ext_mod_cb_runtime), in test_exceptions_success() 147 bpf_program__fd(skel->progs.exception_ext_mod_cb_runtime), in test_exceptions_success() 157 bpf_program__fd(skel->progs.exception_ext_mod_cb_runtime), in test_exceptions_success() 167 bpf_program__fd(skel->progs.exception_ext_mod_cb_runtime), in test_exceptions_success() 177 bpf_program__fd(skel->progs.exception_ext_mod_cb_runtime), in test_exceptions_success() 187 bpf_program__fd(skel->progs.exception_ext), in test_exceptions_success() 198 bpf_program__fd(skel->progs.exception_throw_subprog), in test_exceptions_success() [all …]
|
H A D | missed.c | 28 prog_fd = bpf_program__fd(skel->progs.trigger); in test_missed_perf_kprobe() 78 prog_fd = bpf_program__fd(skel->progs.trigger); in test_missed_kprobe_recursion() 83 ASSERT_EQ(get_missed_count(bpf_program__fd(skel->progs.test1)), 0, "test1_recursion_misses"); in test_missed_kprobe_recursion() 84 ASSERT_GE(get_missed_count(bpf_program__fd(skel->progs.test2)), 1, "test2_recursion_misses"); in test_missed_kprobe_recursion() 85 ASSERT_GE(get_missed_count(bpf_program__fd(skel->progs.test3)), 1, "test3_recursion_misses"); in test_missed_kprobe_recursion() 86 ASSERT_GE(get_missed_count(bpf_program__fd(skel->progs.test4)), 1, "test4_recursion_misses"); in test_missed_kprobe_recursion() 87 ASSERT_GE(get_missed_count(bpf_program__fd(skel->progs.test5)), 1, "test5_recursion_misses"); in test_missed_kprobe_recursion() 116 prog_fd = bpf_program__fd(skel->progs.trigger); in test_missed_tp_recursion() 121 ASSERT_EQ(get_missed_count(bpf_program__fd(skel->progs.test1)), 0, "test1_recursion_misses"); in test_missed_tp_recursion() 122 ASSERT_EQ(get_missed_count(bpf_program__fd(skel->progs.test2)), 1, "test2_recursion_misses"); in test_missed_tp_recursion() [all …]
|
H A D | map_kptr.c | 25 ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.test_map_kptr_ref1), &opts); in test_map_kptr_success() 28 ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.test_map_kptr_ref2), &opts); in test_map_kptr_success() 32 ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.test_ls_map_kptr_ref1), &lopts); in test_map_kptr_success() 36 ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.test_ls_map_kptr_ref2), &lopts); in test_map_kptr_success() 55 ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.test_map_kptr_ref3), &opts); in test_map_kptr_success() 63 ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.test_map_kptr_ref3), &opts); in test_map_kptr_success() 70 ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.test_map_kptr_ref3), &opts); in test_map_kptr_success() 77 ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.test_map_kptr_ref3), &opts); in test_map_kptr_success() 84 ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.test_map_kptr_ref3), &opts); in test_map_kptr_success() 91 ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.test_map_kptr_ref3), &opts); in test_map_kptr_success() [all …]
|
H A D | local_kptr_stash.c | 23 ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.stash_rb_nodes), &opts); in test_local_kptr_stash_simple() 44 ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.stash_plain), &opts); in test_local_kptr_stash_plain() 65 ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.stash_local_with_root), &opts); in test_local_kptr_stash_local_with_root() 86 ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.stash_rb_nodes), &opts); in test_local_kptr_stash_unstash() 90 ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.unstash_rb_node), &opts); in test_local_kptr_stash_unstash() 111 ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.refcount_acquire_without_unstash), in test_refcount_acquire_without_unstash() 116 ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.stash_refcounted_node), &opts); in test_refcount_acquire_without_unstash() 120 ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.refcount_acquire_without_unstash), in test_refcount_acquire_without_unstash()
|
H A D | xdp_devmap_attach.c | 39 dm_fd_redir = bpf_program__fd(skel->progs.xdp_redir_prog); in test_xdp_with_devmap_helpers() 44 dm_fd = bpf_program__fd(skel->progs.xdp_dummy_dm); in test_xdp_with_devmap_helpers() 80 val.bpf_prog.fd = bpf_program__fd(skel->progs.xdp_dummy_prog); in test_xdp_with_devmap_helpers() 89 val.bpf_prog.fd = bpf_program__fd(skel->progs.xdp_dummy_dm_frags); in test_xdp_with_devmap_helpers() 125 dm_fd_frags = bpf_program__fd(skel->progs.xdp_dummy_dm_frags); in test_xdp_with_devmap_frags_helpers() 145 val.bpf_prog.fd = bpf_program__fd(skel->progs.xdp_dummy_dm); in test_xdp_with_devmap_frags_helpers() 183 dm_fd_redir = bpf_program__fd(skel->progs.xdp_redir_prog); in test_xdp_with_devmap_helpers_veth() 188 dm_fd = bpf_program__fd(skel->progs.xdp_dummy_dm); in test_xdp_with_devmap_helpers_veth() 203 dm_fd = bpf_program__fd(skel->progs.xdp_dummy_prog); in test_xdp_with_devmap_helpers_veth()
|
H A D | test_tunnel.c | 426 get_src_prog_fd = bpf_program__fd(skel->progs.vxlan_get_tunnel_src); in test_vxlan_tunnel() 427 set_src_prog_fd = bpf_program__fd(skel->progs.vxlan_set_tunnel_src); in test_vxlan_tunnel() 440 set_dst_prog_fd = bpf_program__fd(skel->progs.veth_set_outer_dst); in test_vxlan_tunnel() 454 set_dst_prog_fd = bpf_program__fd(skel->progs.vxlan_set_tunnel_dst); in test_vxlan_tunnel() 510 get_src_prog_fd = bpf_program__fd(skel->progs.ip6vxlan_get_tunnel_src); in test_ip6vxlan_tunnel() 511 set_src_prog_fd = bpf_program__fd(skel->progs.ip6vxlan_set_tunnel_src); in test_ip6vxlan_tunnel() 527 set_dst_prog_fd = bpf_program__fd(skel->progs.ip6vxlan_set_tunnel_dst); in test_ip6vxlan_tunnel() 583 get_src_prog_fd = bpf_program__fd( in test_ipip_tunnel() 585 set_src_prog_fd = bpf_program__fd( in test_ipip_tunnel() 589 get_src_prog_fd = bpf_program__fd( in test_ipip_tunnel() [all …]
|
H A D | tc_links.c | 30 pid1 = id_from_prog_fd(bpf_program__fd(skel->progs.tc1)); in serial_test_tc_links_basic() 31 pid2 = id_from_prog_fd(bpf_program__fd(skel->progs.tc2)); in serial_test_tc_links_basic() 143 pid1 = id_from_prog_fd(bpf_program__fd(skel->progs.tc1)); in test_tc_links_before_target() 144 pid2 = id_from_prog_fd(bpf_program__fd(skel->progs.tc2)); in test_tc_links_before_target() 145 pid3 = id_from_prog_fd(bpf_program__fd(skel->progs.tc3)); in test_tc_links_before_target() 146 pid4 = id_from_prog_fd(bpf_program__fd(skel->progs.tc4)); in test_tc_links_before_target() 204 .relative_fd = bpf_program__fd(skel->progs.tc2), in test_tc_links_before_target() 297 pid1 = id_from_prog_fd(bpf_program__fd(skel->progs.tc1)); in test_tc_links_after_target() 298 pid2 = id_from_prog_fd(bpf_program__fd(skel->progs.tc2)); in test_tc_links_after_target() 299 pid3 = id_from_prog_fd(bpf_program__fd(skel->progs.tc3)); in test_tc_links_after_target() [all …]
|
H A D | arena_atomics.c | 12 prog_fd = bpf_program__fd(skel->progs.add); in test_add() 37 prog_fd = bpf_program__fd(skel->progs.sub); in test_sub() 62 prog_fd = bpf_program__fd(skel->progs.and); in test_and() 79 prog_fd = bpf_program__fd(skel->progs.or); in test_or() 96 prog_fd = bpf_program__fd(skel->progs.xor); in test_xor() 113 prog_fd = bpf_program__fd(skel->progs.cmpxchg); in test_cmpxchg() 135 prog_fd = bpf_program__fd(skel->progs.xchg); in test_xchg() 155 prog_fd = bpf_program__fd(skel->progs.uaf); in test_uaf()
|
H A D | xdp_cpumap_attach.c | 35 prog_redir_fd = bpf_program__fd(skel->progs.xdp_redir_prog); in test_xdp_with_cpumap_helpers() 40 prog_fd = bpf_program__fd(skel->progs.xdp_dummy_cm); in test_xdp_with_cpumap_helpers() 80 val.bpf_prog.fd = bpf_program__fd(skel->progs.xdp_dummy_prog); in test_xdp_with_cpumap_frags_helpers() 89 val.bpf_prog.fd = bpf_program__fd(skel->progs.xdp_dummy_cm_frags); in test_xdp_with_cpumap_frags_helpers() 114 frags_prog_fd = bpf_program__fd(skel->progs.xdp_dummy_cm_frags); in serial_test_xdp_cpumap_attach() 134 val.bpf_prog.fd = bpf_program__fd(skel->progs.xdp_dummy_cm);
|
H A D | tc_opts.c | 27 fd1 = bpf_program__fd(skel->progs.tc1); in serial_test_tc_opts_basic() 28 fd2 = bpf_program__fd(skel->progs.tc2); in serial_test_tc_opts_basic() 125 fd1 = bpf_program__fd(skel->progs.tc1); in test_tc_opts_before_target() 126 fd2 = bpf_program__fd(skel->progs.tc2); in test_tc_opts_before_target() 127 fd3 = bpf_program__fd(skel->progs.tc3); in test_tc_opts_before_target() 128 fd4 = bpf_program__fd(skel->progs.tc4); in test_tc_opts_before_target() 277 fd1 = bpf_program__fd(skel->progs.tc1); in test_tc_opts_after_target() 278 fd2 = bpf_program__fd(skel->progs.tc2); in test_tc_opts_after_target() 279 fd3 = bpf_program__fd(skel->progs.tc3); in test_tc_opts_after_target() 280 fd4 = bpf_program__fd(skel->progs.tc4); in test_tc_opts_after_target() [all …]
|
H A D | rbtree.c | 26 ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.rbtree_add_nodes), &opts); in test_rbtree_add_nodes() 48 ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.rbtree_add_nodes_nested), &opts); in test_rbtree_add_nodes_nested() 70 ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.rbtree_add_and_remove), &opts); in test_rbtree_add_and_remove() 92 ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.rbtree_add_and_remove_array), &opts); in test_rbtree_add_and_remove_array() 113 ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.rbtree_first_and_remove), &opts); in test_rbtree_first_and_remove() 137 ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.rbtree_api_release_aliasing), &opts); in test_rbtree_api_release_aliasing()
|
H A D | tailcalls.c | 39 main_fd = bpf_program__fd(prog); in test_tailcall_1() 58 prog_fd = bpf_program__fd(prog); in test_tailcall_1() 88 prog_fd = bpf_program__fd(prog); in test_tailcall_1() 109 prog_fd = bpf_program__fd(prog); in test_tailcall_1() 175 main_fd = bpf_program__fd(prog); in test_tailcall_2() 194 prog_fd = bpf_program__fd(prog); in test_tailcall_2() 252 main_fd = bpf_program__fd(prog); in test_tailcall_count() 268 prog_fd = bpf_program__fd(prog); in test_tailcall_count() 436 main_fd = bpf_program__fd(prog); in test_tailcall_4() 463 prog_fd = bpf_program__fd(prog); in test_tailcall_4() [all …]
|
H A D | recursive_attach.c | 58 prev_fd = bpf_program__fd(target_skel->progs.test1); in test_recursive_fentry_chain() 61 prev_fd = bpf_program__fd(tracing_chain[i-1]->progs.recursive_attach); in test_recursive_fentry_chain() 129 tgt_prog_fd = bpf_program__fd(target_skel->progs.fentry_target); in test_fentry_attach_btf_presence() 138 tgt_prog_fd = bpf_program__fd(tracing_skel->progs.recursive_attach); in test_fentry_attach_btf_presence()
|
H A D | dummy_st_ops.c | 42 fd = bpf_program__fd(skel->progs.test_1); in test_dummy_init_ret_value() 69 fd = bpf_program__fd(skel->progs.test_1); in test_dummy_init_ptr_arg() 116 fd = bpf_program__fd(skel->progs.test_2); in test_dummy_multiple_args() 143 fd = bpf_program__fd(skel->progs.test_sleepable); in test_dummy_sleepable() 168 fd = bpf_program__fd(skel->progs.test_sleepable); in test_dummy_sleepable_reject_null()
|
H A D | refcounted_kptr.c | 34 …ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.rbtree_wrong_owner_remove_fail_a1), &opts… in test_refcounted_kptr_wrong_owner() 38 ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.rbtree_wrong_owner_remove_fail_b), &opts); in test_refcounted_kptr_wrong_owner() 42 …ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.rbtree_wrong_owner_remove_fail_a2), &opts… in test_refcounted_kptr_wrong_owner()
|
H A D | metadata.c | 75 err = prog_holds_map(bpf_program__fd(obj->progs.prog), in test_metadata_unused() 92 err = bpf_prog_bind_map(bpf_program__fd(obj->progs.prog), in test_metadata_unused() 109 err = prog_holds_map(bpf_program__fd(obj->progs.prog), in test_metadata_used() 126 err = bpf_prog_bind_map(bpf_program__fd(obj->progs.prog), in test_metadata_used()
|
H A D | sockmap_basic.c | 150 verdict = bpf_program__fd(skel->progs.prog_msg_verdict); in test_skmsg_helpers() 186 err = bpf_prog_attach(bpf_program__fd(prog), map, BPF_SK_MSG_VERDICT, 0); in test_skmsg_helpers_with_link() 207 opts.old_prog_fd = bpf_program__fd(prog_clone2); in test_skmsg_helpers_with_link() 209 err = bpf_link_update(bpf_link__fd(link), bpf_program__fd(prog), &opts); in test_skmsg_helpers_with_link() 213 opts.old_prog_fd = bpf_program__fd(prog_clone); in test_skmsg_helpers_with_link() 215 err = bpf_link_update(bpf_link__fd(link), bpf_program__fd(prog), &opts); in test_skmsg_helpers_with_link() 245 prog = bpf_program__fd(skel->progs.copy_sock_map); in test_sockmap_update() 373 verdict = bpf_program__fd(skel->progs.prog_skb_verdict); in test_sockmap_skb_verdict_attach() 408 err = bpf_prog_attach(bpf_program__fd(prog), map, BPF_SK_SKB_STREAM_VERDICT, 0); in test_sockmap_skb_verdict_attach_with_link() 417 err = bpf_prog_detach2(bpf_program__fd(prog), map, BPF_SK_SKB_STREAM_VERDICT); in test_sockmap_skb_verdict_attach_with_link() [all …]
|
H A D | bpf_cookie.c | 76 prog_fd = bpf_program__fd(skel->progs.trigger); in kprobe_multi_test_run() 147 prog_fd = bpf_program__fd(skel->progs.test_kprobe); in kprobe_multi_link_api_subtest() 163 prog_fd = bpf_program__fd(skel->progs.test_kretprobe); in kprobe_multi_link_api_subtest() 504 prog_fd = bpf_program__fd(skel->progs.fentry_test1); in tracing_subtest() 511 prog_fd = bpf_program__fd(skel->progs.fexit_test1); in tracing_subtest() 518 prog_fd = bpf_program__fd(skel->progs.fmod_ret_test); in tracing_subtest() 524 prog_fd = bpf_program__fd(skel->progs.fentry_test1); in tracing_subtest() 527 prog_fd = bpf_program__fd(skel->progs.fmod_ret_test); in tracing_subtest() 556 prog_fd = bpf_program__fd(skel->progs.test_int_hook); in lsm_subtest() 588 prog_fd = bpf_program__fd(ske in tp_btf_subtest() [all...] |
H A D | lsm_cgroup.c | 95 post_create_prog_fd = bpf_program__fd(skel->progs.socket_post_create); in test_lsm_cgroup_functional() 96 post_create_prog_fd2 = bpf_program__fd(skel->progs.socket_post_create2); in test_lsm_cgroup_functional() 97 bind_prog_fd = bpf_program__fd(skel->progs.socket_bind); in test_lsm_cgroup_functional() 98 bind_prog_fd2 = bpf_program__fd(skel->progs.socket_bind2); in test_lsm_cgroup_functional() 99 alloc_prog_fd = bpf_program__fd(skel->progs.socket_alloc); in test_lsm_cgroup_functional() 100 clone_prog_fd = bpf_program__fd(skel->progs.socket_clone); in test_lsm_cgroup_functional()
|
H A D | linked_list.c | 168 ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.map_list_push_pop), &opts); in test_linked_list_success() 174 ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.inner_map_list_push_pop), &opts); in test_linked_list_success() 180 ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.global_list_push_pop), &opts); in test_linked_list_success() 186 ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.global_list_push_pop_nested), &opts); in test_linked_list_success() 192 ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.global_list_array_push_pop), &opts); in test_linked_list_success() 202 ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.map_list_push_pop_multiple), &opts); in test_linked_list_success() 208 ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.inner_map_list_push_pop_multiple), &opts); in test_linked_list_success() 214 ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.global_list_push_pop_multiple), &opts); in test_linked_list_success() 224 ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.map_list_in_list), &opts); in test_linked_list_success() 230 ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.inner_map_list_in_list), &opts); in test_linked_list_success() [all …]
|
H A D | cgroup_link.c | 49 prog_fd = bpf_program__fd(skel->progs.egress); in serial_test_cgroup_link() 186 link_upd_opts.old_prog_fd = bpf_program__fd(skel->progs.egress_alt); in serial_test_cgroup_link() 189 bpf_program__fd(skel->progs.egress_alt), in serial_test_cgroup_link() 196 link_upd_opts.old_prog_fd = bpf_program__fd(skel->progs.egress); in serial_test_cgroup_link() 199 bpf_program__fd(skel->progs.egress_alt), in serial_test_cgroup_link()
|
H A D | get_func_ip_test.c | 30 prog_fd = bpf_program__fd(skel->progs.test1); in test_function_entry() 35 prog_fd = bpf_program__fd(skel->progs.test5); in test_function_entry() 91 prog_fd = bpf_program__fd(skel->progs.test1); in test_function_body_kprobe()
|
H A D | percpu_alloc.c | 33 prog_fd = bpf_program__fd(skel->progs.test_array_map_1); in test_array() 66 prog_fd = bpf_program__fd(skel->progs.test_array_map_10); in test_array_sleepable() 101 prog_fd = bpf_program__fd(skel->progs.test_cgrp_local_storage_1); in test_cgrp_local_storage()
|
H A D | tc_netkit.c | 205 pid1 = id_from_prog_fd(bpf_program__fd(skel->progs.tc1)); in serial_test_tc_netkit_basic() 206 pid2 = id_from_prog_fd(bpf_program__fd(skel->progs.tc2)); in serial_test_tc_netkit_basic() 320 pid1 = id_from_prog_fd(bpf_program__fd(skel->progs.tc1)); in serial_test_tc_netkit_multi_links_target() 321 pid2 = id_from_prog_fd(bpf_program__fd(skel->progs.tc2)); in serial_test_tc_netkit_multi_links_target() 368 .relative_fd = bpf_program__fd(skel->progs.tc1), in serial_test_tc_netkit_multi_links_target() 440 fd1 = bpf_program__fd(skel->progs.tc1); in serial_test_tc_netkit_multi_opts_target() 441 fd2 = bpf_program__fd(skel->progs.tc2); in serial_test_tc_netkit_multi_opts_target() 569 pid1 = id_from_prog_fd(bpf_program__fd(skel->progs.tc1)); in serial_test_tc_netkit_device() 570 pid2 = id_from_prog_fd(bpf_program__fd(skel->progs.tc2)); in serial_test_tc_netkit_device() 674 pid1 = id_from_prog_fd(bpf_program__fd(ske in serial_test_tc_netkit_neigh_links_target() [all...] |
H A D | get_func_args_test.c | 22 prog_fd = bpf_program__fd(skel->progs.test1); in test_get_func_args_test() 30 prog_fd = bpf_program__fd(skel->progs.fmod_ret_test); in test_get_func_args_test()
|