/linux/tools/testing/selftests/bpf/prog_tests/ |
A D | sockopt_inherit.c | 70 int client_fd; in server_thread() local 88 client_fd = accept(fd, (struct sockaddr *)&addr, &len); in server_thread() 89 if (CHECK_FAIL(client_fd < 0)) { in server_thread() 94 err += verify_sockopt(client_fd, CUSTOM_INHERIT1, "accept", 1); in server_thread() 95 err += verify_sockopt(client_fd, CUSTOM_INHERIT2, "accept", 1); in server_thread() 96 err += verify_sockopt(client_fd, CUSTOM_LISTENER, "accept", 0); in server_thread() 98 close(client_fd); in server_thread() 173 int server_fd = -1, client_fd; in run_test() local 205 client_fd = connect_to_server(server_fd); in run_test() 206 if (CHECK_FAIL(client_fd < 0)) in run_test() [all …]
|
A D | netns_cookie.c | 15 int server_fd = -1, client_fd = -1, cgroup_fd = -1; in test_netns_cookie() local 45 client_fd = connect_to_fd(server_fd, 0); in test_netns_cookie() 46 if (CHECK(client_fd < 0, "connect_to_fd", "errno %d\n", errno)) in test_netns_cookie() 49 ret = send(client_fd, send_msg, sizeof(send_msg), 0); in test_netns_cookie() 54 &client_fd, &val); in test_netns_cookie() 58 err = getsockopt(client_fd, SOL_SOCKET, SO_NETNS_COOKIE, in test_netns_cookie() 66 &client_fd, &val); in test_netns_cookie() 75 if (client_fd != -1) in test_netns_cookie() 76 close(client_fd); in test_netns_cookie()
|
A D | tcp_rtt.c | 46 static int verify_sk(int map_fd, int client_fd, const char *msg, __u32 invoked, in verify_sk() argument 53 if (CHECK_FAIL(bpf_map_lookup_elem(map_fd, &client_fd, &val) < 0)) { in verify_sk() 101 int client_fd; in run_test() local 121 client_fd = connect_to_fd(server_fd, 0); in run_test() 122 if (client_fd < 0) { in run_test() 127 err += verify_sk(map_fd, client_fd, "syn-ack", in run_test() 134 send_byte(client_fd); in run_test() 135 if (wait_for_ack(client_fd, 100) < 0) { in run_test() 141 err += verify_sk(map_fd, client_fd, "first payload byte", in run_test() 149 close(client_fd); in run_test()
|
A D | socket_cookie.c | 18 int server_fd = 0, client_fd = 0, cgroup_fd = 0, err = 0; in test_socket_cookie() local 52 client_fd = connect_to_fd(server_fd, 0); in test_socket_cookie() 53 if (CHECK(client_fd < 0, "connect_to_fd", "errno %d\n", errno)) in test_socket_cookie() 57 &client_fd, &val); in test_socket_cookie() 61 err = getsockname(client_fd, (struct sockaddr *)&addr, &addr_len); in test_socket_cookie() 69 close(client_fd); in test_socket_cookie()
|
A D | sk_lookup.c | 441 err = send_byte(client_fd); in tcp_echo_test() 447 err = recv_byte(client_fd); in tcp_echo_test() 653 if (client_fd < 0) in run_lookup_prog() 661 close(client_fd); in run_lookup_prog() 884 if (client_fd < 0) in drop_on_lookup() 902 close(client_fd); in drop_on_lookup() 1142 if (client_fd < 0) in run_sk_assign_connected() 1145 send_byte(client_fd); in run_sk_assign_connected() 1149 close(client_fd); in run_sk_assign_connected() 1224 if (client_fd < 0) in run_multi_prog_lookup() [all …]
|
A D | load_bytes_relative.c | 12 int server_fd, cgroup_fd, prog_fd, map_fd, client_fd; in test_load_bytes_relative() local 52 client_fd = connect_to_fd(server_fd, 0); in test_load_bytes_relative() 53 if (CHECK_FAIL(client_fd < 0)) in test_load_bytes_relative() 55 close(client_fd); in test_load_bytes_relative()
|
A D | cgroup_v1v2.c | 48 int server_fd, client_fd, cgroup_fd; in test_cgroup_v1v2() local 55 client_fd = connect_to_fd_opts(server_fd, &opts); in test_cgroup_v1v2() 56 if (!ASSERT_GE(client_fd, 0, "client_fd")) { in test_cgroup_v1v2() 60 close(client_fd); in test_cgroup_v1v2()
|
A D | cg_storage_multi.c | 60 int server_fd = -1, client_fd = -1; in connect_send() local 69 client_fd = connect_to_fd(server_fd, 0); in connect_send() 70 if (client_fd < 0) in connect_send() 73 if (send(client_fd, "message", strlen("message"), 0) < 0) in connect_send() 79 close(client_fd); in connect_send()
|
A D | tc_redirect.c | 358 int listen_fd = -1, accept_fd = -1, client_fd = -1; in test_tcp() local 376 client_fd = connect_to_fd(listen_fd, TIMEOUT_MILLIS); in test_tcp() 377 if (!ASSERT_GE(client_fd, 0, "connect_to_fd")) in test_tcp() 387 n = write(client_fd, buf, sizeof(buf)); in test_tcp() 401 if (client_fd >= 0) in test_tcp() 402 close(client_fd); in test_tcp()
|
/linux/tools/testing/vsock/ |
A D | util.c | 155 int client_fd; in vsock_accept() local 174 client_fd = accept(fd, &clientaddr.sa, &clientaddr_len); in vsock_accept() 176 } while (client_fd < 0 && errno == EINTR); in vsock_accept() 183 if (client_fd < 0) in vsock_accept() 184 return client_fd; in vsock_accept() 199 return client_fd; in vsock_accept()
|
A D | vsock_diag_test.c | 404 int client_fd; in test_connect_server() local 406 client_fd = vsock_stream_accept(VMADDR_CID_ANY, 1234, NULL); in test_connect_server() 407 if (client_fd < 0) { in test_connect_server() 415 st = find_vsock_stat(&sockets, client_fd); in test_connect_server() 421 close(client_fd); in test_connect_server()
|
/linux/tools/testing/selftests/bpf/ |
A D | network_helpers.c | 294 int connect_fd_to_fd(int client_fd, int server_fd, int timeout_ms) in connect_fd_to_fd() argument 299 if (settimeo(client_fd, timeout_ms)) in connect_fd_to_fd() 307 if (connect_fd_to_addr(client_fd, &addr, len, false)) in connect_fd_to_fd()
|
A D | network_helpers.h | 51 int connect_fd_to_fd(int client_fd, int server_fd, int timeout_ms);
|
/linux/fs/notify/fanotify/ |
A D | fanotify_user.c | 235 int client_fd; in create_fd() local 238 client_fd = get_unused_fd_flags(group->fanotify_data.f_flags); in create_fd() 239 if (client_fd < 0) in create_fd() 240 return client_fd; in create_fd() 257 put_unused_fd(client_fd); in create_fd() 258 client_fd = PTR_ERR(new_file); in create_fd() 263 return client_fd; in create_fd()
|