Home
last modified time | relevance | path

Searched refs:CHECK_FAIL (Results 1 – 25 of 39) sorted by relevance

12

/linux/tools/testing/selftests/bpf/prog_tests/
H A Dflow_dissector_reattach.c29 if (CHECK_FAIL(err)) { in query_attached_prog_id()
51 if (CHECK_FAIL(fd < 0)) in load_prog()
64 if (CHECK_FAIL(err || info_len != sizeof(info))) { in query_prog_id()
77 if (CHECK_FAIL(err)) { in unshare_net()
82 if (CHECK_FAIL(new_net < 0)) { in unshare_net()
95 if (CHECK_FAIL(err)) { in test_prog_attach_prog_attach()
99 CHECK_FAIL(query_attached_prog_id(netns) != query_prog_id(prog1)); in test_prog_attach_prog_attach()
103 if (CHECK_FAIL(err)) { in test_prog_attach_prog_attach()
107 CHECK_FAIL(query_attached_prog_id(netns) != query_prog_id(prog2)); in test_prog_attach_prog_attach()
111 if (CHECK_FAIL(!err || errno != EINVAL)) in test_prog_attach_prog_attach()
[all …]
H A Dcgroup_attach_multi.c94 if (CHECK_FAIL(setup_cgroup_environment())) in serial_test_cgroup_attach_multi()
98 if (CHECK_FAIL(cg1 < 0)) in serial_test_cgroup_attach_multi()
101 if (CHECK_FAIL(cg2 < 0)) in serial_test_cgroup_attach_multi()
104 if (CHECK_FAIL(cg3 < 0)) in serial_test_cgroup_attach_multi()
107 if (CHECK_FAIL(cg4 < 0)) in serial_test_cgroup_attach_multi()
110 if (CHECK_FAIL(cg5 < 0)) in serial_test_cgroup_attach_multi()
113 if (CHECK_FAIL(join_cgroup("/cg1/cg2/cg3/cg4/cg5"))) in serial_test_cgroup_attach_multi()
150 CHECK_FAIL(system(PING_CMD)); in serial_test_cgroup_attach_multi()
151 CHECK_FAIL(bpf_map_lookup_elem(map_fd, &key, &value)); in serial_test_cgroup_attach_multi()
152 CHECK_FAIL(value != 1 + 2 + 8 + 32); in serial_test_cgroup_attach_multi()
[all …]
H A Dmmap.c92 CHECK_FAIL(bss_data->in_val); in test_mmap()
93 CHECK_FAIL(bss_data->out_val); in test_mmap()
94 CHECK_FAIL(skel->bss->in_val); in test_mmap()
95 CHECK_FAIL(skel->bss->out_val); in test_mmap()
96 CHECK_FAIL(map_data->val[0]); in test_mmap()
97 CHECK_FAIL(map_data->val[1]); in test_mmap()
98 CHECK_FAIL(map_data->val[2]); in test_mmap()
99 CHECK_FAIL(map_data->val[far]); in test_mmap()
107 CHECK_FAIL(bpf_map_update_elem(data_map_fd, &zero, &val, 0)); in test_mmap()
111 CHECK_FAIL(bss_data->in_val != 123); in test_mmap()
[all …]
H A Dtailcalls.c31 if (CHECK_FAIL(err)) in test_tailcall_1()
35 if (CHECK_FAIL(!prog)) in test_tailcall_1()
39 if (CHECK_FAIL(main_fd < 0)) in test_tailcall_1()
43 if (CHECK_FAIL(!prog_array)) in test_tailcall_1()
47 if (CHECK_FAIL(map_fd < 0)) in test_tailcall_1()
54 if (CHECK_FAIL(!prog)) in test_tailcall_1()
58 if (CHECK_FAIL(prog_fd < 0)) in test_tailcall_1()
62 if (CHECK_FAIL(err)) in test_tailcall_1()
72 if (CHECK_FAIL(err)) in test_tailcall_1()
84 if (CHECK_FAIL(!prog)) in test_tailcall_1()
[all …]
H A Dsk_assign.c38 if (CHECK_FAIL(!tc)) in configure_stack()
40 if (CHECK_FAIL(!fgets(tc_version, sizeof(tc_version), tc))) in configure_stack()
46 if (CHECK_FAIL(pclose(tc))) in configure_stack()
50 if (CHECK_FAIL(unshare(CLONE_NEWNET))) in configure_stack()
54 if (CHECK_FAIL(system("ip link set dev lo up"))) in configure_stack()
56 if (CHECK_FAIL(system("ip route add local default dev lo"))) in configure_stack()
58 if (CHECK_FAIL(system("ip -6 route add local default dev lo"))) in configure_stack()
62 if (CHECK_FAIL(system("tc qdisc add dev lo clsact"))) in configure_stack()
82 if (CHECK_FAIL(getsockname(fd, (struct sockaddr *)&ss, &slen))) in get_port()
125 if (CHECK_FAIL(srv_client == -1)) { in run_test()
[all …]
H A Dmap_lock.c28 if (CHECK_FAIL(err)) { in parallel_map_access()
32 if (CHECK_FAIL(vars[0] != 0)) { in parallel_map_access()
42 CHECK_FAIL(vars[j] != rnd); in parallel_map_access()
60 if (CHECK_FAIL(err)) { in test_map_lock()
65 if (CHECK_FAIL(map_fd[0] < 0)) in test_map_lock()
68 if (CHECK_FAIL(map_fd[1] < 0)) in test_map_lock()
74 if (CHECK_FAIL(pthread_create(&thread_id[i], NULL, in test_map_lock()
78 if (CHECK_FAIL(pthread_create(&thread_id[i], NULL, in test_map_lock()
83 if (CHECK_FAIL(pthread_join(thread_id[i], &ret) || in test_map_lock()
87 if (CHECK_FAIL(pthread_join(thread_id[i], &ret) || in test_map_lock()
H A Dload_bytes_relative.c23 if (CHECK_FAIL(cgroup_fd < 0)) in test_load_bytes_relative()
27 if (CHECK_FAIL(server_fd < 0)) in test_load_bytes_relative()
32 if (CHECK_FAIL(err)) in test_load_bytes_relative()
36 if (CHECK_FAIL(!test_result)) in test_load_bytes_relative()
44 if (CHECK_FAIL(!prog)) in test_load_bytes_relative()
49 if (CHECK_FAIL(err)) in test_load_bytes_relative()
53 if (CHECK_FAIL(client_fd < 0)) in test_load_bytes_relative()
58 if (CHECK_FAIL(err)) in test_load_bytes_relative()
H A Dconnect_force_port.c138 if (CHECK_FAIL(cgroup_fd < 0)) in test_connect_force_port()
142 if (CHECK_FAIL(server_fd < 0)) in test_connect_force_port()
144 CHECK_FAIL(run_test(cgroup_fd, server_fd, AF_INET, SOCK_STREAM)); in test_connect_force_port()
148 if (CHECK_FAIL(server_fd < 0)) in test_connect_force_port()
150 CHECK_FAIL(run_test(cgroup_fd, server_fd, AF_INET6, SOCK_STREAM)); in test_connect_force_port()
154 if (CHECK_FAIL(server_fd < 0)) in test_connect_force_port()
156 CHECK_FAIL(run_test(cgroup_fd, server_fd, AF_INET, SOCK_DGRAM)); in test_connect_force_port()
160 if (CHECK_FAIL(server_fd < 0)) in test_connect_force_port()
162 CHECK_FAIL(run_test(cgroup_fd, server_fd, AF_INET6, SOCK_DGRAM)); in test_connect_force_port()
H A Dcgroup_attach_autodetach.c40 if (CHECK_FAIL(setup_cgroup_environment())) in serial_test_cgroup_attach_autodetach()
45 if (CHECK_FAIL(cg < 0)) in serial_test_cgroup_attach_autodetach()
48 if (CHECK_FAIL(join_cgroup("/cg_autodetach"))) in serial_test_cgroup_attach_autodetach()
63 if (CHECK_FAIL(system(PING_CMD))) in serial_test_cgroup_attach_autodetach()
68 if (CHECK_FAIL(!ptr)) in serial_test_cgroup_attach_autodetach()
96 if (CHECK_FAIL(!attempts)) in serial_test_cgroup_attach_autodetach()
H A Dglobal_data_init.c16 if (CHECK_FAIL(err)) in test_global_data_init()
20 if (CHECK_FAIL(!map || !bpf_map__is_internal(map))) in test_global_data_init()
25 if (CHECK_FAIL(!newval)) in test_global_data_init()
39 if (CHECK_FAIL(err)) in test_global_data_init()
43 if (CHECK_FAIL(map_fd < 0)) in test_global_data_init()
H A Dcls_redirect.c73 if (CHECK_FAIL(getsockname(*server, sa, &slen))) in set_up_conn()
84 if (CHECK_FAIL(getsockname(*conn, sa, &slen))) in set_up_conn()
87 if (CHECK_FAIL(!fill_addr_port(sa, &tuple->dst))) in set_up_conn()
91 if (CHECK_FAIL(getpeername(*conn, sa, &slen))) in set_up_conn()
94 if (CHECK_FAIL(!fill_addr_port(sa, &tuple->src))) in set_up_conn()
352 if (CHECK_FAIL(!slen)) in test_cls_redirect_common()
355 if (CHECK_FAIL(!set_up_conn(addr, slen, SOCK_DGRAM, in test_cls_redirect_common()
360 if (CHECK_FAIL(!set_up_conn(addr, slen, SOCK_STREAM, in test_cls_redirect_common()
384 if (CHECK_FAIL(!tattr.data_size_in)) in test_cls_redirect_common()
388 if (CHECK_FAIL(err)) in test_cls_redirect_common()
[all …]
H A Dtest_lsm.c130 if (CHECK_FAIL(map_fd < 0)) in test_lsm_tailcall()
134 if (CHECK_FAIL(prog_fd < 0)) in test_lsm_tailcall()
139 if (CHECK_FAIL(!err)) in test_lsm_tailcall()
143 if (CHECK_FAIL(prog_fd < 0)) in test_lsm_tailcall()
147 if (CHECK_FAIL(err)) in test_lsm_tailcall()
H A Dstacktrace_map.c29 if (CHECK_FAIL(control_map_fd < 0)) in test_stacktrace_map()
33 if (CHECK_FAIL(stackid_hmap_fd < 0)) in test_stacktrace_map()
37 if (CHECK_FAIL(stackmap_fd < 0)) in test_stacktrace_map()
41 if (CHECK_FAIL(stack_amap_fd < 0)) in test_stacktrace_map()
H A Dbtf_skc_cls_ingress.c84 if (CHECK_FAIL(listen_fd == -1)) in test_conn()
95 if (CHECK_FAIL(cli_fd == -1)) in test_conn()
99 if (CHECK_FAIL(srv_fd == -1)) in test_conn()
139 if (CHECK_FAIL(listen_fd == -1)) in test_syncookie()
150 if (CHECK_FAIL(cli_fd == -1)) in test_syncookie()
154 if (CHECK_FAIL(srv_fd == -1)) in test_syncookie()
H A Dxdp_attach.c19 if (CHECK_FAIL(err)) in test_xdp_attach()
22 if (CHECK_FAIL(err)) in test_xdp_attach()
27 if (CHECK_FAIL(err)) in test_xdp_attach()
32 if (CHECK_FAIL(err)) in test_xdp_attach()
37 if (CHECK_FAIL(err)) in test_xdp_attach()
H A Dstacktrace_map_raw_tp.c29 if (CHECK_FAIL(control_map_fd < 0)) in test_stacktrace_map_raw_tp()
33 if (CHECK_FAIL(stackid_hmap_fd < 0)) in test_stacktrace_map_raw_tp()
37 if (CHECK_FAIL(stackmap_fd < 0)) in test_stacktrace_map_raw_tp()
H A Dglobal_data.c11 if (CHECK_FAIL(map_fd < 0)) in test_global_data_number()
46 if (CHECK_FAIL(map_fd < 0)) in test_global_data_string()
81 if (CHECK_FAIL(map_fd < 0)) in test_global_data_struct()
121 if (CHECK_FAIL(map_fd < 0)) in test_global_data_rdonly()
H A Dcgroup_link.c17 CHECK_FAIL(system(PING_CMD)); in ping_and_check()
77 CHECK_FAIL(err); in serial_test_cgroup_link()
78 CHECK_FAIL(attach_flags != BPF_F_ALLOW_MULTI); in serial_test_cgroup_link()
86 CHECK_FAIL(err); in serial_test_cgroup_link()
95 CHECK_FAIL(err); in serial_test_cgroup_link()
H A Dsock_fields.c283 if (CHECK_FAIL(listen_fd == -1)) in test()
293 if (CHECK_FAIL(cli_fd == -1)) in test()
358 if (CHECK_FAIL(parent_cg_fd < 0)) in serial_test_sock_fields()
361 if (CHECK_FAIL(!parent_cg_id)) in serial_test_sock_fields()
365 if (CHECK_FAIL(child_cg_fd < 0)) in serial_test_sock_fields()
368 if (CHECK_FAIL(!child_cg_id)) in serial_test_sock_fields()
H A Dbtf_map_in_map.c83 if (CHECK_FAIL(err)) { in test_lookup_update()
88 if (CHECK_FAIL(err)) { in test_lookup_update()
94 if (CHECK_FAIL(err)) { in test_lookup_update()
H A Dstacktrace_build_id.c32 if (CHECK_FAIL(system("dd if=/dev/urandom of=/dev/zero count=4 2> /dev/null"))) in test_stacktrace_build_id()
34 if (CHECK_FAIL(system("./urandom_read"))) in test_stacktrace_build_id()
H A Dl4lb_all.c38 if (CHECK_FAIL(err)) in test_l4lb()
83 if (CHECK_FAIL(bytes != MAGIC_BYTES * NUM_ITER * 2 || in test_l4lb()
H A Dqueue_stack_map.c38 if (CHECK_FAIL(err)) in test_queue_stack_map_by_type()
52 if (CHECK_FAIL(err)) in test_queue_stack_map_by_type()
H A Dstacktrace_build_id_nmi.c59 if (CHECK_FAIL(system("dd if=/dev/urandom of=/dev/zero count=4 2> /dev/null"))) in test_stacktrace_build_id_nmi()
61 if (CHECK_FAIL(system("taskset 0x1 ./urandom_read 100000"))) in test_stacktrace_build_id_nmi()
H A Dpkt_md_access.c17 if (CHECK_FAIL(err)) in test_pkt_md_access()

12