/openbmc/linux/tools/testing/selftests/bpf/prog_tests/ |
H A D | map_kptr.c | 26 ASSERT_OK(ret, "test_map_kptr_ref1 refcount"); in test_map_kptr_success() 29 ASSERT_OK(ret, "test_map_kptr_ref2 refcount"); in test_map_kptr_success() 53 ASSERT_OK(ret, "array_map update"); in test_map_kptr_success() 61 ASSERT_OK(ret, "pcpu_array_map update"); in test_map_kptr_success() 68 ASSERT_OK(ret, "hash_map delete"); in test_map_kptr_success() 75 ASSERT_OK(ret, "pcpu_hash_map delete"); in test_map_kptr_success() 82 ASSERT_OK(ret, "hash_malloc_map delete"); in test_map_kptr_success() 96 ASSERT_OK(ret, "lru_hash_map delete"); in test_map_kptr_success() 103 ASSERT_OK(ret, "lru_pcpu_hash_map delete"); in test_map_kptr_success() 150 ASSERT_OK(kern_sync_rcu(), "sync rcu"); in serial_test_map_kptr() [all …]
|
H A D | linked_list.c | 169 ASSERT_OK(ret, "map_list_push_pop"); in test_linked_list_success() 175 ASSERT_OK(ret, "inner_map_list_push_pop"); in test_linked_list_success() 181 ASSERT_OK(ret, "global_list_push_pop"); in test_linked_list_success() 191 ASSERT_OK(ret, "map_list_push_pop_multiple"); in test_linked_list_success() 213 ASSERT_OK(ret, "map_list_in_list"); in test_linked_list_success() 219 ASSERT_OK(ret, "inner_map_list_in_list"); in test_linked_list_success() 225 ASSERT_OK(ret, "global_list_in_list"); in test_linked_list_success() 287 if (!ASSERT_OK(err, "btf__add_field bar::a")) in list_and_rb_node_same_struct() 290 if (!ASSERT_OK(err, "btf__add_field bar::c")) in list_and_rb_node_same_struct() 302 if (!ASSERT_OK(err, "btf__add_field foo::a")) in list_and_rb_node_same_struct() [all …]
|
H A D | arg_parsing.c | 33 ASSERT_OK(parse_test_list("arg_parsing", &set, true), "parsing"); in test_parse_test_list() 42 ASSERT_OK(parse_test_list("arg_parsing,bpf_cookie", &set, true), in test_parse_test_list() 50 ASSERT_OK(strcmp("arg_parsing", set.tests[0].name), "test name"); in test_parse_test_list() 51 ASSERT_OK(strcmp("bpf_cookie", set.tests[1].name), "test name"); in test_parse_test_list() 54 ASSERT_OK(parse_test_list("arg_parsing/arg_parsing,bpf_cookie", in test_parse_test_list() 66 ASSERT_OK(strcmp("arg_parsing", set.tests[0].subtests[0]), in test_parse_test_list() 84 ASSERT_OK(strcmp("arg_parsing", set.tests[0].subtests[0]), in test_parse_test_list() 109 ASSERT_OK(strcmp("t", set.tests[0].name), "test name"); in test_parse_test_list() 144 if (!ASSERT_OK(ferror(fp), "prepare tmp")) in test_parse_test_list_file() 154 ASSERT_OK(strcmp("testA", set.tests[1].name), "test 1 name"); in test_parse_test_list_file() [all …]
|
H A D | test_bpffs.c | 39 if (!ASSERT_OK(err, "unshare")) in fn() 43 if (!ASSERT_OK(err, "mount /")) in fn() 47 if (!ASSERT_OK(err, "umount " TDIR)) in fn() 51 if (!ASSERT_OK(err, "mount tmpfs")) in fn() 55 if (!ASSERT_OK(err, "mkdir " TDIR "/fs1")) in fn() 58 if (!ASSERT_OK(err, "mkdir " TDIR "/fs2")) in fn() 76 if (!ASSERT_OK(err, "creating " TDIR "/fs1/a")) in fn() 89 if (!ASSERT_OK(err, "pin map")) in fn() 95 if (!ASSERT_OK(err, "stat(" TDIR "/fs1/a)")) in fn() 101 if (!ASSERT_OK(err, "stat(" TDIR "/fs1/b)")) in fn() [all …]
|
H A D | bpf_obj_pinning.c | 56 if (!ASSERT_OK(err, "fs_create")) in bpf_obj_pinning_detached() 83 if (!ASSERT_OK(err, "map_pin")) in bpf_obj_pinning_detached() 96 ASSERT_OK(err, "map_update"); in bpf_obj_pinning_detached() 101 ASSERT_OK(err, "map_lookup"); in bpf_obj_pinning_detached() 111 ASSERT_OK(close(fs_fd), "close_fs_fd"); in bpf_obj_pinning_detached() 156 ASSERT_OK(err, "obj_pin"); in validate_pin() 170 ASSERT_OK(err, "map_update"); in validate_pin() 175 ASSERT_OK(err, "map_lookup"); in validate_pin() 194 if (!ASSERT_OK(err, "pin_map")) in validate_get() 231 ASSERT_OK(err, "map_update"); in validate_get() [all …]
|
H A D | cgroup_tcp_skb.c | 72 if (!ASSERT_OK(err, "join_root_cgroup")) in talk_to_cgroup() 78 if (!ASSERT_OK(err, "join_cgroup")) in talk_to_cgroup() 90 if (!ASSERT_OK(err, "connect_fd_to_fd")) in talk_to_cgroup() 96 if (!ASSERT_OK(err, "join_root_cgroup")) in talk_to_cgroup() 119 if (!ASSERT_OK(err, "join_root_cgroup")) in talk_to_outside() 125 if (!ASSERT_OK(err, "join_cgroup")) in talk_to_outside() 131 if (!ASSERT_OK(err, "join_root_cgroup")) in talk_to_outside() 140 if (!ASSERT_OK(err, "connect_fd_to_fd")) in talk_to_outside() 198 if (!ASSERT_OK(err, "close peer_fd")) in close_connection() 266 if (!ASSERT_OK(err, "talk_to_cgroup")) in test_cgroup_tcp_skb() [all …]
|
H A D | migrate_reuseport.c | 168 if (!ASSERT_OK(err, "lseek")) in setup_fastopen() 241 if (!ASSERT_OK(err, "bind")) in start_servers() 248 if (!ASSERT_OK(err, in start_servers() 270 if (!ASSERT_OK(err, "listen")) in start_servers() 302 if (!ASSERT_OK(err, in start_clients() 310 if (!ASSERT_OK(err, "connect")) in start_clients() 382 if (!ASSERT_OK(err, "listen")) in migrate_dance() 391 if (!ASSERT_OK(err, "shutdown")) in migrate_dance() 396 if (!ASSERT_OK(err, "listen")) in migrate_dance() 401 if (!ASSERT_OK(err, "shutdown")) in migrate_dance() [all …]
|
H A D | xdp_bonding.c | 354 if (!ASSERT_OK(err, "add interface to map_all")) in test_xdp_bonding_redirect_multi() 404 if (!ASSERT_OK(err, "set veth master")) in test_xdp_bonding_attach() 442 if (!ASSERT_OK(err, "set vxlan master")) in test_xdp_bonding_attach() 476 if (!ASSERT_OK(err, "set bond_nest1 master")) in test_xdp_bonding_nested() 483 if (!ASSERT_OK(err, "set bond_nest2 master")) in test_xdp_bonding_nested() 511 if (!ASSERT_OK(err, "bond bpf_xdp_query")) in test_xdp_bonding_features() 534 if (!ASSERT_OK(err, "bond bpf_xdp_query")) in test_xdp_bonding_features() 554 if (!ASSERT_OK(err, "bond bpf_xdp_query")) in test_xdp_bonding_features() 569 if (!ASSERT_OK(err, "bond bpf_xdp_query")) in test_xdp_bonding_features() 586 if (!ASSERT_OK(err, "bond bpf_xdp_query")) in test_xdp_bonding_features() [all …]
|
H A D | lookup_and_delete.c | 20 if (!ASSERT_OK(err, "bpf_map_update_elem")) in fill_values() 37 if (!ASSERT_OK(err, "bpf_map_update_elem")) in fill_values_percpu() 55 if (!ASSERT_OK(err, "bpf_map__set_type")) in setup_prog() 59 if (!ASSERT_OK(err, "bpf_map__set_max_entries")) in setup_prog() 63 if (!ASSERT_OK(err, "test_lookup_and_delete__load")) in setup_prog() 110 if (!ASSERT_OK(err, "fill_values")) in test_lookup_and_delete_hash() 146 if (!ASSERT_OK(err, "fill_values_percpu")) in test_lookup_and_delete_percpu_hash() 186 if (!ASSERT_OK(err, "fill_values")) in test_lookup_and_delete_lru_hash() 192 if (!ASSERT_OK(err, "trigger_tp")) in test_lookup_and_delete_lru_hash() 232 if (!ASSERT_OK(err, "fill_values_percpu")) in test_lookup_and_delete_lru_percpu_hash() [all …]
|
H A D | sockmap_ktls.c | 22 if (!ASSERT_OK(err, "listen")) in tcp_server() 47 if (!ASSERT_OK(err, "getsockopt")) in test_sockmap_ktls_disconnect_after_delete() 55 if (!ASSERT_OK(err, "connect")) in test_sockmap_ktls_disconnect_after_delete() 59 if (!ASSERT_OK(err, "bpf_map_update_elem")) in test_sockmap_ktls_disconnect_after_delete() 63 if (!ASSERT_OK(err, "setsockopt(TCP_ULP)")) in test_sockmap_ktls_disconnect_after_delete() 67 if (!ASSERT_OK(err, "bpf_map_delete_elem")) in test_sockmap_ktls_disconnect_after_delete() 71 ASSERT_OK(err, "disconnect"); in test_sockmap_ktls_disconnect_after_delete() 106 if (!ASSERT_OK(err, "bind")) in test_sockmap_ktls_update_fails_when_sock_has_ulp() 110 if (!ASSERT_OK(err, "getsockname")) in test_sockmap_ktls_update_fails_when_sock_has_ulp() 114 if (!ASSERT_OK(err, "connect")) in test_sockmap_ktls_update_fails_when_sock_has_ulp() [all …]
|
H A D | atomics.c | 15 if (!ASSERT_OK(err, "test_run_opts err")) in test_add() 17 if (!ASSERT_OK(topts.retval, "test_run_opts retval")) in test_add() 40 if (!ASSERT_OK(err, "test_run_opts err")) in test_sub() 42 if (!ASSERT_OK(topts.retval, "test_run_opts retval")) in test_sub() 65 if (!ASSERT_OK(err, "test_run_opts err")) in test_and() 67 if (!ASSERT_OK(topts.retval, "test_run_opts retval")) in test_and() 87 if (!ASSERT_OK(err, "test_run_opts err")) in test_or() 89 if (!ASSERT_OK(topts.retval, "test_run_opts retval")) in test_or() 109 if (!ASSERT_OK(err, "test_run_opts err")) in test_xor() 131 if (!ASSERT_OK(err, "test_run_opts err")) in test_cmpxchg() [all …]
|
H A D | map_init.c | 31 if (!ASSERT_OK(err, "bpf_map_update_elem")) in map_populate() 49 if (!ASSERT_OK(err, "bpf_map__set_type")) in setup() 53 if (!ASSERT_OK(err, "bpf_map__set_max_entries")) in setup() 57 if (!ASSERT_OK(err, "skel_load")) in setup() 65 if (!ASSERT_OK(err, "map_populate")) in setup() 89 if (!ASSERT_OK(test_map_init__attach(skel), "skel_attach")) in prog_run_insert_elem() 144 if (!ASSERT_OK(err, "bpf_map_delete_elem")) in test_pcpu_map_init() 149 if (!ASSERT_OK(err, "prog_run_insert_elem")) in test_pcpu_map_init() 154 if (!ASSERT_OK(err, "bpf_map_lookup_elem")) in test_pcpu_map_init() 186 if (!ASSERT_OK(err, "prog_run_insert_elem")) in test_pcpu_lru_map_init() [all …]
|
H A D | tc_opts.c | 54 if (!ASSERT_OK(err, "prog_query")) in serial_test_tc_opts_basic() 95 ASSERT_OK(err, "prog_detach_eg"); in serial_test_tc_opts_basic() 102 ASSERT_OK(err, "prog_detach_in"); in serial_test_tc_opts_basic() 235 ASSERT_OK(err, "prog_detach"); in test_tc_opts_before_target() 240 ASSERT_OK(err, "prog_detach"); in test_tc_opts_before_target() 245 ASSERT_OK(err, "prog_detach"); in test_tc_opts_before_target() 250 ASSERT_OK(err, "prog_detach"); in test_tc_opts_before_target() 387 ASSERT_OK(err, "prog_detach"); in test_tc_opts_after_target() 406 ASSERT_OK(err, "prog_detach"); in test_tc_opts_after_target() 424 ASSERT_OK(err, "prog_detach"); in test_tc_opts_after_target() [all …]
|
H A D | task_local_storage.c | 29 if (!ASSERT_OK(err, "skel_attach")) in test_sys_enter_exit() 54 if (!ASSERT_OK(err, "skel_attach")) in test_exit_creds() 97 if (!ASSERT_OK(err, "skel_attach")) in test_recursion() 111 ASSERT_OK(err, "lookup map_a"); in test_recursion() 117 ASSERT_OK(err, "lookup map_b"); in test_recursion() 123 ASSERT_OK(err, "get prog info"); in test_recursion() 129 ASSERT_OK(err, "get prog info"); in test_recursion() 135 ASSERT_OK(err, "get prog info"); in test_recursion() 185 if (!ASSERT_OK(err, "getaffinity")) in test_nodeadlock() 204 ASSERT_OK(err, "attach prog"); in test_nodeadlock() [all …]
|
H A D | sockmap_basic.c | 44 if (!ASSERT_OK(err, "connect")) in connected_socket_v4() 77 if (!ASSERT_OK(err, "lookup_elem(src)")) in compare_cookies() 81 if (!ASSERT_OK(err, "lookup_elem(dst)")) in compare_cookies() 103 if (!ASSERT_OK(err, "bpf_map_update")) in test_sockmap_create_update_free() 124 if (!ASSERT_OK(err, "bpf_prog_attach")) in test_skmsg_helpers() 128 if (!ASSERT_OK(err, "bpf_prog_detach2")) in test_skmsg_helpers() 164 if (!ASSERT_OK(err, "update_elem(src)")) in test_sockmap_update() 168 if (!ASSERT_OK(err, "test_run")) in test_sockmap_update() 231 if (!ASSERT_OK(err, "map_update")) in test_sockmap_copy() 288 if (!ASSERT_OK(err, "bpf_prog_attach")) in test_sockmap_skb_verdict_attach() [all …]
|
H A D | refcounted_kptr.c | 35 ASSERT_OK(ret, "rbtree_wrong_owner_remove_fail_a1"); in test_refcounted_kptr_wrong_owner() 36 ASSERT_OK(opts.retval, "rbtree_wrong_owner_remove_fail_a1 retval"); in test_refcounted_kptr_wrong_owner() 39 ASSERT_OK(ret, "rbtree_wrong_owner_remove_fail_b"); in test_refcounted_kptr_wrong_owner() 40 ASSERT_OK(opts.retval, "rbtree_wrong_owner_remove_fail_b retval"); in test_refcounted_kptr_wrong_owner() 43 ASSERT_OK(ret, "rbtree_wrong_owner_remove_fail_a2"); in test_refcounted_kptr_wrong_owner() 44 ASSERT_OK(opts.retval, "rbtree_wrong_owner_remove_fail_a2 retval"); in test_refcounted_kptr_wrong_owner()
|
H A D | xdp_link.c | 33 if (!ASSERT_OK(err, "fd_info1")) in serial_test_xdp_link() 39 if (!ASSERT_OK(err, "fd_info2")) in serial_test_xdp_link() 45 if (!ASSERT_OK(err, "fd_attach")) in serial_test_xdp_link() 50 if (!ASSERT_OK(err, "id1_check_err") || !ASSERT_EQ(id0, id1, "id1_check_val")) in serial_test_xdp_link() 66 if (!ASSERT_OK(err, "prog_detach")) in serial_test_xdp_link() 77 if (!ASSERT_OK(err, "id1_check_err") || !ASSERT_EQ(id0, id1, "id1_check_val")) in serial_test_xdp_link() 113 if (!ASSERT_OK(err, "id2_check_err") || !ASSERT_EQ(id0, id2, "id2_check_val")) in serial_test_xdp_link() 118 if (!ASSERT_OK(err, "link_upd")) in serial_test_xdp_link() 124 if (!ASSERT_OK(err, "link_info")) in serial_test_xdp_link() 137 if (!ASSERT_OK(err, "link_detach")) in serial_test_xdp_link() [all …]
|
H A D | local_kptr_stash.c | 24 ASSERT_OK(ret, "local_kptr_stash_add_nodes run"); in test_local_kptr_stash_simple() 25 ASSERT_OK(opts.retval, "local_kptr_stash_add_nodes retval"); in test_local_kptr_stash_simple() 45 ASSERT_OK(ret, "local_kptr_stash_add_plain run"); in test_local_kptr_stash_plain() 46 ASSERT_OK(opts.retval, "local_kptr_stash_add_plain retval"); in test_local_kptr_stash_plain() 66 ASSERT_OK(ret, "local_kptr_stash_add_nodes run"); in test_local_kptr_stash_unstash() 67 ASSERT_OK(opts.retval, "local_kptr_stash_add_nodes retval"); in test_local_kptr_stash_unstash() 70 ASSERT_OK(ret, "local_kptr_stash_add_nodes run"); in test_local_kptr_stash_unstash()
|
H A D | sk_storage_tracing.c | 32 if (!ASSERT_OK(err, "map_lookup(sk_stg_map)")) in check_sk_stg() 65 if (!ASSERT_OK(err, "map_update(del_sk_stg_map)")) in do_test() 75 if (!ASSERT_OK(err, "read(passive_fd)")) in do_test() 80 if (!ASSERT_OK(err, "read(active_fd)")) in do_test() 89 if (!ASSERT_OK(err, "listen_fd sk_stg")) in do_test() 93 if (!ASSERT_OK(err, "active_fd sk_stg")) in do_test() 97 ASSERT_OK(err, "passive_fd sk_stg"); in do_test() 127 if (!ASSERT_OK(err, "test_sk_storage_tracing__attach")) { in serial_test_sk_storage_tracing()
|
H A D | connect_ping.c | 56 if (!ASSERT_OK(connect(sock_fd, sa, sa_len), "connect")) in subtest() 68 if (!ASSERT_OK(getsockname(sock_fd, sa, &sa_len), in subtest() 101 if (!ASSERT_OK(unshare(CLONE_NEWNET | CLONE_NEWNS), "unshare")) in test_connect_ping() 107 if (!ASSERT_OK(mount("none", "/sys", NULL, MS_PRIVATE, NULL), in test_connect_ping() 110 if (!ASSERT_OK(mount("sysfs", "/sys", "sysfs", 0, NULL), in test_connect_ping() 113 if (!ASSERT_OK(mount("bpffs", "/sys/fs/bpf", "bpf", 0, NULL), in test_connect_ping() 117 if (!ASSERT_OK(system("ip link set dev lo up"), "lo-up")) in test_connect_ping() 119 if (!ASSERT_OK(system("ip addr add 1.1.1.1 dev lo"), "lo-addr-v4")) in test_connect_ping() 121 if (!ASSERT_OK(system("ip -6 addr add 2001:db8::1 dev lo"), "lo-addr-v6")) in test_connect_ping()
|
H A D | rbtree.c | 27 ASSERT_OK(ret, "rbtree_add_nodes run"); in test_rbtree_add_nodes() 28 ASSERT_OK(opts.retval, "rbtree_add_nodes retval"); in test_rbtree_add_nodes() 49 ASSERT_OK(ret, "rbtree_add_and_remove"); in test_rbtree_add_and_remove() 50 ASSERT_OK(opts.retval, "rbtree_add_and_remove retval"); in test_rbtree_add_and_remove() 71 ASSERT_OK(ret, "rbtree_first_and_remove"); in test_rbtree_first_and_remove() 72 ASSERT_OK(opts.retval, "rbtree_first_and_remove retval"); in test_rbtree_first_and_remove() 95 ASSERT_OK(ret, "rbtree_api_release_aliasing"); in test_rbtree_api_release_aliasing() 96 ASSERT_OK(opts.retval, "rbtree_api_release_aliasing retval"); in test_rbtree_api_release_aliasing()
|
H A D | tailcalls.c | 62 ASSERT_OK(err, "tailcall"); in test_tailcall_1() 71 ASSERT_OK(err, "tailcall"); in test_tailcall_1() 91 ASSERT_OK(err, "tailcall"); in test_tailcall_1() 115 ASSERT_OK(err, "tailcall"); in test_tailcall_1() 124 ASSERT_OK(err, "tailcall"); in test_tailcall_1() 133 ASSERT_OK(err, "tailcall"); in test_tailcall_1() 197 ASSERT_OK(err, "tailcall"); in test_tailcall_2() 206 ASSERT_OK(err, "tailcall"); in test_tailcall_2() 215 ASSERT_OK(err, "tailcall"); in test_tailcall_2() 269 ASSERT_OK(err, "tailcall"); in test_tailcall_count() [all …]
|
H A D | xdp_adjust_tail.c | 21 if (!ASSERT_OK(err, "test_xdp_adjust_tail_shrink")) in test_xdp_adjust_tail_shrink() 25 ASSERT_OK(err, "ipv4"); in test_xdp_adjust_tail_shrink() 33 ASSERT_OK(err, "ipv6"); in test_xdp_adjust_tail_shrink() 60 ASSERT_OK(err, "ipv4"); in test_xdp_adjust_tail_grow() 68 ASSERT_OK(err, "ipv6"); in test_xdp_adjust_tail_grow() 127 ASSERT_OK(err, "case-128"); in test_xdp_adjust_tail_grow2() 179 ASSERT_OK(err, "9Kb-10b"); in test_xdp_adjust_frags_tail_shrink() 190 ASSERT_OK(err, "9Kb-4Kb"); in test_xdp_adjust_frags_tail_shrink() 200 ASSERT_OK(err, "9Kb-9Kb"); in test_xdp_adjust_frags_tail_shrink() 243 ASSERT_OK(err, "9Kb+10b"); in test_xdp_adjust_frags_tail_grow() [all …]
|
H A D | global_map_resize.c | 40 if (!ASSERT_OK(err, "bpf_map__set_value_size")) in global_map_resize_bss_subtest() 47 ASSERT_OK(err, "percpu_arr_resize"); in global_map_resize_bss_subtest() 72 if (!ASSERT_OK(err, "test_global_map_resize__load")) in global_map_resize_bss_subtest() 75 if (!ASSERT_OK(err, "test_global_map_resize__attach")) in global_map_resize_bss_subtest() 110 if (!ASSERT_OK(err, "bpf_map__set_value_size")) in global_map_resize_data_subtest() 117 ASSERT_OK(err, "percpu_arr_resize"); in global_map_resize_data_subtest() 142 if (!ASSERT_OK(err, "test_global_map_resize__load")) in global_map_resize_data_subtest() 145 if (!ASSERT_OK(err, "test_global_map_resize__attach")) in global_map_resize_data_subtest() 184 if (!ASSERT_OK(err, ".data.custom bpf_map__set_value_size") || in global_map_resize_invalid_subtest() 197 if (!ASSERT_OK(err, ".data.non_array bpf_map__set_value_size") || in global_map_resize_invalid_subtest() [all …]
|
H A D | tc_links.c | 60 if (!ASSERT_OK(err, "prog_query")) in serial_test_tc_links_basic() 93 if (!ASSERT_OK(err, "prog_query")) in serial_test_tc_links_basic() 140 if (!ASSERT_OK(err, "skel_load")) in test_tc_links_before_target() 182 if (!ASSERT_OK(err, "prog_query")) in test_tc_links_before_target() 235 if (!ASSERT_OK(err, "prog_query")) in test_tc_links_before_target() 294 if (!ASSERT_OK(err, "skel_load")) in test_tc_links_after_target() 336 if (!ASSERT_OK(err, "prog_query")) in test_tc_links_after_target() 443 if (!ASSERT_OK(err, "skel_load")) in test_tc_links_revision_target() 544 if (!ASSERT_OK(err, "skel_load")) in test_tc_chain_classic() 610 ASSERT_OK(err, "bpf_tc_detach"); in test_tc_chain_classic() [all …]
|