Lines Matching refs:sock
22 int sock[2]; in TEST() local
33 ASSERT_EQ(0, socketpair(AF_UNIX, SOCK_STREAM, 0, sock)); in TEST()
37 ASSERT_GE(cras_send_with_fds(sock[0], msg, strlen(msg), send_fds, num_fds), in TEST()
39 ASSERT_GE(cras_recv_with_fds(sock[1], buf, strlen(msg), new_fds, &num_fds), in TEST()
46 close(sock[0]); in TEST()
47 close(sock[1]); in TEST()
68 int sock[2]; in TEST() local
78 ASSERT_EQ(0, socketpair(AF_UNIX, SOCK_STREAM, 0, sock)); in TEST()
80 ASSERT_GE(cras_send_with_fds(sock[0], msg, strlen(msg), &fd[1], 1), 0); in TEST()
81 ASSERT_GE(cras_recv_with_fds(sock[1], buf, strlen(msg), new_fds, &num_fds), in TEST()
88 close(sock[0]); in TEST()
89 close(sock[1]); in TEST()
105 int sock[2]; in TEST() local
115 ASSERT_EQ(0, socketpair(AF_UNIX, SOCK_STREAM, 0, sock)); in TEST()
117 ASSERT_EQ(5, cras_send_with_fds(sock[0], msg, strlen(msg), &fd[1], num_fds)); in TEST()
119 cras_recv_with_fds(sock[1], buf, strlen(msg), &new_fd, &num_fds)); in TEST()
123 close(sock[0]); in TEST()
124 close(sock[1]); in TEST()
141 int sock[2]; in TEST() local
143 ASSERT_EQ(0, socketpair(AF_UNIX, SOCK_STREAM, 0, sock)); in TEST()
145 ASSERT_GE(cras_send_with_fds(sock[0], msg, strlen(msg), NULL, num_fds), 0); in TEST()
146 ASSERT_GE(cras_recv_with_fds(sock[1], buf, strlen(msg), NULL, &num_fds), 0); in TEST()
150 close(sock[0]); in TEST()
151 close(sock[1]); in TEST()