| /Linux-v5.15/tools/testing/selftests/bpf/prog_tests/ |
| D | migrate_reuseport.c | 168 if (!ASSERT_OK(err, "lseek")) in setup_fastopen() 208 if (!ASSERT_OK(err, "bpf_link__detach")) in pass_ack() 235 if (!ASSERT_OK(err, "setsockopt - SO_REUSEPORT")) in start_servers() 241 if (!ASSERT_OK(err, "bind")) in start_servers() 248 if (!ASSERT_OK(err, in start_servers() 255 if (!ASSERT_OK(err, "getsockname")) in start_servers() 263 if (!ASSERT_OK(err, "setsockopt - TCP_FASTOPEN")) in start_servers() 270 if (!ASSERT_OK(err, "listen")) in start_servers() 293 if (!ASSERT_OK(err, "settimeo")) in start_clients() 302 if (!ASSERT_OK(err, in start_clients() [all …]
|
| D | tc_redirect.c | 98 if (!ASSERT_OK(err, "setns")) in setns_by_fd() 105 if (!ASSERT_OK(err, "unshare")) in setns_by_fd() 109 if (!ASSERT_OK(err, "umount2 /sys")) in setns_by_fd() 113 if (!ASSERT_OK(err, "mount /sys")) in setns_by_fd() 117 if (!ASSERT_OK(err, "mount /sys/fs/bpf")) in setns_by_fd() 150 if (!ASSERT_OK(err, "setns_by_fd")) in open_netns() 161 ASSERT_OK(setns_by_fd(token->orig_netns_fd), "setns_by_fd"); in close_netns() 172 if (!ASSERT_OK(system(cmd), cmd)) in netns_setup_namespaces() 229 if (!ASSERT_OK(system(cmd), cmd)) \ 372 if (!ASSERT_OK(settimeo(accept_fd, TIMEOUT_MILLIS), "settimeo")) in test_tcp() [all …]
|
| 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() 88 if (!ASSERT_OK(err, "test_lookup_and_delete__attach")) in trigger_tp() 110 if (!ASSERT_OK(err, "fill_values")) in test_lookup_and_delete_hash() 116 if (!ASSERT_OK(err, "bpf_map_lookup_and_delete_elem")) in test_lookup_and_delete_hash() 145 if (!ASSERT_OK(err, "fill_values_percpu")) in test_lookup_and_delete_percpu_hash() 151 if (!ASSERT_OK(err, "bpf_map_lookup_and_delete_elem")) in test_lookup_and_delete_percpu_hash() [all …]
|
| 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 …]
|
| 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 test_sk_storage_tracing()
|
| D | xdp_bonding.c | 36 ASSERT_OK(setns(root_netns_fd, CLONE_NEWNET), "restore_root_netns"); in restore_root_netns() 148 if (!ASSERT_OK(system(cmd), cmd)) \ in bonding_setup() 187 if (!ASSERT_OK(setns_by_name("ns_dst"), "set netns to ns_dst")) in bonding_setup() 208 ASSERT_OK(system("ip link delete bond1"), "delete bond1"); in bonding_cleanup() 209 ASSERT_OK(system("ip link delete veth1_1"), "delete veth1_1"); in bonding_cleanup() 210 ASSERT_OK(system("ip link delete veth1_2"), "delete veth1_2"); in bonding_cleanup() 211 ASSERT_OK(system("ip netns delete ns_dst"), "delete ns_dst"); in bonding_cleanup() 345 if (!ASSERT_OK(setns_by_name("ns_dst"), "could not set netns to ns_dst")) in test_xdp_bonding_redirect_multi() 357 if (!ASSERT_OK(err, "add interface to map_all")) in test_xdp_bonding_redirect_multi() 389 if (!ASSERT_OK(system("ip link add veth type veth"), "add veth")) in test_xdp_bonding_attach() [all …]
|
| D | tc_bpf.c | 33 if (!ASSERT_OK(ret, "bpf_obj_get_info_by_fd")) in test_tc_bpf_basic() 37 if (!ASSERT_OK(ret, "bpf_tc_attach")) in test_tc_bpf_basic() 48 if (!ASSERT_OK(ret, "bpf_tc_attach replace mode")) in test_tc_bpf_basic() 53 if (!ASSERT_OK(ret, "bpf_tc_query")) in test_tc_bpf_basic() 64 ASSERT_OK(ret, "bpf_tc_detach"); in test_tc_bpf_basic() 305 if (!ASSERT_OK(ret, "bpf_tc_attach valid handle unset")) in test_tc_bpf_api() 308 ASSERT_OK(bpf_tc_detach(hook, &opts_pf), "bpf_tc_detach"); in test_tc_bpf_api() 311 if (!ASSERT_OK(ret, "bpf_tc_attach valid priority unset")) in test_tc_bpf_api() 314 ASSERT_OK(bpf_tc_detach(hook, &opts_hf), "bpf_tc_detach"); in test_tc_bpf_api() 321 if (!ASSERT_OK(ret, "bpf_tc_attach valid both handle and priority unset")) in test_tc_bpf_api() [all …]
|
| D | xdp_cpumap_attach.c | 27 if (!ASSERT_OK(err, "Generic attach of program with 8-byte CPUMAP")) in test_xdp_cpumap_attach() 31 ASSERT_OK(err, "XDP program detach"); in test_xdp_cpumap_attach() 36 if (!ASSERT_OK(err, "bpf_obj_get_info_by_fd")) in test_xdp_cpumap_attach() 41 ASSERT_OK(err, "Add program to cpumap entry"); in test_xdp_cpumap_attach() 44 ASSERT_OK(err, "Read cpumap entry"); in test_xdp_cpumap_attach()
|
| D | xdp_devmap_attach.c | 29 if (!ASSERT_OK(err, "Generic attach of program with 8-byte devmap")) in test_xdp_with_devmap_helpers() 33 ASSERT_OK(err, "XDP program detach"); in test_xdp_with_devmap_helpers() 38 if (!ASSERT_OK(err, "bpf_obj_get_info_by_fd")) in test_xdp_with_devmap_helpers() 43 ASSERT_OK(err, "Add program to devmap entry"); in test_xdp_with_devmap_helpers() 46 ASSERT_OK(err, "Read devmap entry"); in test_xdp_with_devmap_helpers()
|
| D | send_signal.c | 23 if (!ASSERT_OK(pipe(pipe_c2p), "pipe_c2p")) in test_send_signal_common() 26 if (!ASSERT_OK(pipe(pipe_p2c), "pipe_p2c")) { in test_send_signal_common() 56 ASSERT_OK(errno, "getpriority"); in test_send_signal_common() 57 ASSERT_OK(setpriority(PRIO_PROCESS, 0, -20), "setpriority"); in test_send_signal_common() 75 ASSERT_OK(setpriority(PRIO_PROCESS, 0, old_prio), "setpriority"); in test_send_signal_common() 91 if (!ASSERT_OK(err, "skel_attach")) { in test_send_signal_common()
|
| D | fentry_test.c | 14 if (!ASSERT_OK(err, "fentry_attach")) in fentry_test() 25 ASSERT_OK(err, "test_run"); in fentry_test() 51 if (!ASSERT_OK(err, "fentry_first_attach")) in test_fentry_test() 55 ASSERT_OK(err, "fentry_second_attach"); in test_fentry_test()
|
| D | fexit_test.c | 14 if (!ASSERT_OK(err, "fexit_attach")) in fexit_test() 25 ASSERT_OK(err, "test_run"); in fexit_test() 51 if (!ASSERT_OK(err, "fexit_first_attach")) in test_fexit_test() 55 ASSERT_OK(err, "fexit_second_attach"); in test_fexit_test()
|
| D | get_func_ip_test.c | 24 if (!ASSERT_OK(err, "get_func_ip_test__load")) in test_get_func_ip_test() 28 if (!ASSERT_OK(err, "get_func_ip_test__attach")) in test_get_func_ip_test() 34 ASSERT_OK(err, "test_run"); in test_get_func_ip_test() 41 ASSERT_OK(err, "test_run"); in test_get_func_ip_test()
|
| D | netcnt.c | 43 ASSERT_OK(system(cmd), cmd); in test_netcnt() 46 if (!ASSERT_OK(bpf_map_get_next_key(map_fd, NULL, &key), "bpf_map_get_next_key")) in test_netcnt() 49 if (!ASSERT_OK(bpf_map_lookup_elem(map_fd, &key, &netcnt), "bpf_map_lookup_elem(netcnt)")) in test_netcnt() 53 if (!ASSERT_OK(bpf_map_lookup_elem(percpu_map_fd, &key, &percpu_netcnt[0]), in test_netcnt()
|
| D | netns_cookie.c | 38 if (!ASSERT_OK(err, "prog_attach")) in test_netns_cookie() 55 if (!ASSERT_OK(err, "map_lookup(sockops_netns_cookies)")) in test_netns_cookie() 60 if (!ASSERT_OK(err, "getsockopt")) in test_netns_cookie() 67 if (!ASSERT_OK(err, "map_lookup(sk_msg_netns_cookies)")) in test_netns_cookie()
|
| D | test_lsm.c | 61 if (!ASSERT_OK(err, "attach")) in test_lsm() 70 if (!ASSERT_OK(err, "exec_cmd")) in test_lsm() 107 if (!ASSERT_OK(err, "test_lsm_first_attach")) in test_test_lsm() 111 ASSERT_OK(err, "test_lsm_second_attach"); in test_test_lsm()
|
| D | btf_dump.c | 151 if (!ASSERT_OK(libbpf_get_error(d), "btf_dump__new")) in test_btf_dump_incremental() 164 ASSERT_OK(err, "enum_val_ok"); in test_btf_dump_incremental() 172 ASSERT_OK(err, "field_ok"); in test_btf_dump_incremental() 176 ASSERT_OK(err, "dump_type_ok"); in test_btf_dump_incremental() 209 ASSERT_OK(err, "field_ok"); in test_btf_dump_incremental() 211 ASSERT_OK(err, "field_ok"); in test_btf_dump_incremental() 215 ASSERT_OK(err, "dump_type_ok"); in test_btf_dump_incremental() 364 ASSERT_OK(btf_dump_data(btf, d, "__int128", NULL, 0, &i, 16, str, in test_btf_dump_int_data() 388 ASSERT_OK(btf_dump_data(btf, d, "test_float", NULL, 0, &t1, 4, str, in test_btf_dump_float_data() 390 ASSERT_OK(btf_dump_data(btf, d, "test_float", NULL, 0, &t2, 4, str, in test_btf_dump_float_data() [all …]
|
| D | timer.c | 12 if (!ASSERT_OK(err, "timer_attach")) in timer() 21 ASSERT_OK(err, "test_run"); in timer() 52 ASSERT_OK(err, "timer"); in test_timer()
|
| D | snprintf.c | 48 if (!ASSERT_OK(test_snprintf__attach(skel), "skel_attach")) in test_snprintf_positive() 60 ASSERT_OK(memcmp(skel->bss->sym_out, exp_sym_out, in test_snprintf_positive() 64 ASSERT_OK(memcmp(skel->bss->addr_out, exp_addr_out, in test_snprintf_positive() 108 ASSERT_OK(load_single_snprintf("valid %d"), "valid usage"); in test_snprintf_negative()
|
| D | btf_write.c | 107 ASSERT_OK(err, "f1_res"); in test_btf_write() 109 ASSERT_OK(err, "f2_res"); in test_btf_write() 141 ASSERT_OK(err, "f1_res"); in test_btf_write() 162 ASSERT_OK(err, "v1_res"); in test_btf_write() 164 ASSERT_OK(err, "v2_res"); in test_btf_write() 235 ASSERT_OK(err, "p1_res"); in test_btf_write() 237 ASSERT_OK(err, "p2_res"); in test_btf_write() 269 ASSERT_OK(err, "v1_res"); in test_btf_write()
|
| D | sockopt_qos_to_cc.c | 16 if (!ASSERT_OK(err, "setsockopt(sock_fd, IPV6_TCLASS)")) in run_setsockopt_test() 22 if (!ASSERT_OK(err, "getsockopt(sock_fd, TCP_CONGESTION)")) in run_setsockopt_test() 51 if (!ASSERT_OK(err, "setsockopt(sock_fd, TCP_CONGESTION)")) in test_sockopt_qos_to_cc()
|
| D | task_local_storage.c | 25 if (!ASSERT_OK(err, "skel_attach")) in test_sys_enter_exit() 49 if (!ASSERT_OK(err, "skel_attach")) in test_exit_creds() 74 if (!ASSERT_OK(err, "skel_attach")) in test_recursion()
|
| D | kfunc_call.c | 20 ASSERT_OK(err, "bpf_prog_test_run(test1)"); in test_main() 26 ASSERT_OK(err, "bpf_prog_test_run(test2)"); in test_main() 44 ASSERT_OK(err, "bpf_prog_test_run(test1)"); in test_subprog()
|
| D | cgroup_v1v2.c | 30 if (classid && !ASSERT_OK(join_classid(), "join_classid")) { in run_test() 72 ASSERT_OK(run_test(cgroup_fd, server_fd, false), "cgroup-v2-only"); in test_cgroup_v1v2() 75 ASSERT_OK(run_test(cgroup_fd, server_fd, true), "cgroup-v1v2"); in test_cgroup_v1v2()
|
| D | timer_mim.c | 14 if (!ASSERT_OK(err, "timer_attach")) in timer_mim() 20 ASSERT_OK(err, "test_run"); in timer_mim() 73 ASSERT_OK(err, "timer_mim"); in test_timer_mim()
|