/linux/tools/testing/selftests/bpf/prog_tests/ |
A D | test_bpffs.c | 37 if (!ASSERT_OK(err, "unshare")) in fn() 41 if (!ASSERT_OK(err, "mount /")) in fn() 45 if (!ASSERT_OK(err, "umount " TDIR)) in fn() 49 if (!ASSERT_OK(err, "mount tmpfs")) in fn() 53 if (!ASSERT_OK(err, "mkdir " TDIR "/fs1")) in fn() 56 if (!ASSERT_OK(err, "mkdir " TDIR "/fs2")) in fn() 74 if (!ASSERT_OK(err, "creating " TDIR "/fs1/a")) in fn() 87 if (!ASSERT_OK(err, "pin map")) in fn() 93 if (!ASSERT_OK(err, "stat(" TDIR "/fs1/a)")) in fn() 99 if (!ASSERT_OK(err, "stat(" TDIR "/fs1/b)")) in fn() [all …]
|
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 …]
|
A 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() 172 if (!ASSERT_OK(system(cmd), cmd)) in netns_setup_namespaces() 241 if (!ASSERT_OK(system(cmd), cmd)) \ 545 if (!ASSERT_OK(err, "test_tc_peer__load")) in test_tc_redirect_peer() 590 if (!ASSERT_OK(err, "ioctl TUNSETIFF")) in tun_open() [all …]
|
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() 145 if (!ASSERT_OK(err, "fill_values_percpu")) in test_lookup_and_delete_percpu_hash() 184 if (!ASSERT_OK(err, "fill_values")) in test_lookup_and_delete_lru_hash() 190 if (!ASSERT_OK(err, "trigger_tp")) in test_lookup_and_delete_lru_hash() 229 if (!ASSERT_OK(err, "fill_values_percpu")) in test_lookup_and_delete_lru_percpu_hash() [all …]
|
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 …]
|
A 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() 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() 357 if (!ASSERT_OK(err, "add interface to map_all")) in test_xdp_bonding_redirect_multi() 407 if (!ASSERT_OK(err, "set veth master")) in test_xdp_bonding_attach() 445 if (!ASSERT_OK(err, "set vxlan master")) in test_xdp_bonding_attach() 479 if (!ASSERT_OK(err, "set bond_nest1 master")) in test_xdp_bonding_nested() [all …]
|
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()
|
A 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() 324 ASSERT_OK(bpf_tc_detach(hook, &opts_f), "bpf_tc_detach"); in test_tc_bpf_api() 359 if (!ASSERT_OK(ret, "test_tc_internal ingress")) in test_tc_bpf() 371 if (!ASSERT_OK(ret, "test_tc_internal ingress")) in test_tc_bpf() 378 if (!ASSERT_OK(ret, "test_tc_internal egress")) in test_tc_bpf() [all …]
|
A D | xdp_cpumap_attach.c | 27 if (!ASSERT_OK(err, "Generic attach of program with 8-byte CPUMAP")) in serial_test_xdp_cpumap_attach() 31 ASSERT_OK(err, "XDP program detach"); in serial_test_xdp_cpumap_attach() 36 if (!ASSERT_OK(err, "bpf_obj_get_info_by_fd")) in serial_test_xdp_cpumap_attach() 41 ASSERT_OK(err, "Add program to cpumap entry"); in serial_test_xdp_cpumap_attach() 44 ASSERT_OK(err, "Read cpumap entry"); in serial_test_xdp_cpumap_attach()
|
A 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()
|
A 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()
|
A D | bloom_filter_map.c | 70 if (!ASSERT_OK(err, "bpf_map_update_elem bloom filter success case")) in test_success_cases() 75 ASSERT_OK(err, "bpf_map_update_elem bloom filter success case"); in test_success_cases() 110 if (!ASSERT_OK(err, "Add random value to inner_map_fd")) in test_inner_map() 117 if (!ASSERT_OK(err, "Add bloom filter map to outer map")) in test_inner_map() 134 ASSERT_OK(err, "Delete inner bloom filter map"); in test_inner_map() 169 if (!ASSERT_OK(err, "Add random value to map_random_data")) in setup_progs() 173 if (!ASSERT_OK(err, "Add random value to map_bloom")) in setup_progs()
|
A D | skc_to_unix_sock.c | 23 if (!ASSERT_OK(err, "could not load BPF object")) in test_skc_to_unix_sock() 27 if (!ASSERT_OK(err, "could not attach BPF object")) in test_skc_to_unix_sock() 41 if (!ASSERT_OK(err, "bind failed")) in test_skc_to_unix_sock() 45 if (!ASSERT_OK(err, "listen failed")) in test_skc_to_unix_sock()
|
A D | fexit_bpf2bpf.c | 70 if (!ASSERT_OK(err, "tgt_prog_load")) in test_fexit_bpf2bpf_common() 75 if (!ASSERT_OK(err, "tgt_fd_get_info")) in test_fexit_bpf2bpf_common() 95 ASSERT_OK(err, "set_attach_target"); in test_fexit_bpf2bpf_common() 99 if (!ASSERT_OK(err, "obj_load")) in test_fexit_bpf2bpf_common() 124 ASSERT_OK(err, "link_fd_get_info"); in test_fexit_bpf2bpf_common() 143 ASSERT_OK(err, "prog_run"); in test_fexit_bpf2bpf_common() 290 ASSERT_OK(err, "freplace__set_attach_target"); in test_fmod_ret_freplace() 307 ASSERT_OK(err, "fmod_ret_set_attach_target"); in test_fmod_ret_freplace() 357 ASSERT_OK(err, "set_attach_target"); in test_obj_load_failure_common()
|
A 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()
|
A 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()
|
A 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() 403 ASSERT_OK(btf_dump_data(btf, d, "test_float", NULL, 0, &t1, 4, str, in test_btf_dump_float_data() 405 ASSERT_OK(btf_dump_data(btf, d, "test_float", NULL, 0, &t2, 4, str, in test_btf_dump_float_data() 407 ASSERT_OK(btf_dump_data(btf, d, "test_float", NULL, 0, &t3, 4, str, in test_btf_dump_float_data() [all …]
|
A 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()
|
A D | netcnt.c | 43 ASSERT_OK(system(cmd), cmd); in serial_test_netcnt() 46 if (!ASSERT_OK(bpf_map_get_next_key(map_fd, NULL, &key), "bpf_map_get_next_key")) in serial_test_netcnt() 49 if (!ASSERT_OK(bpf_map_lookup_elem(map_fd, &key, &netcnt), "bpf_map_lookup_elem(netcnt)")) in serial_test_netcnt() 53 if (!ASSERT_OK(bpf_map_lookup_elem(percpu_map_fd, &key, &percpu_netcnt[0]), in serial_test_netcnt()
|
A 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()
|
A 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()
|
A D | module_attach.c | 56 ASSERT_OK(err, "set_attach_target"); in test_module_attach() 69 ASSERT_OK(trigger_module_test_read(READ_SZ), "trigger_read"); in test_module_attach() 70 ASSERT_OK(trigger_module_test_write(WRITE_SZ), "trigger_write"); in test_module_attach() 83 ASSERT_OK(trigger_module_test_writable(&writable_val), in test_module_attach()
|
A 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()
|
A D | timer.c | 12 if (!ASSERT_OK(err, "timer_attach")) in timer() 21 ASSERT_OK(err, "test_run"); in timer() 53 ASSERT_OK(err, "timer"); in serial_test_timer()
|
A 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()
|