Lines Matching refs:ASSERT_EQ

87 	ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC));  in TEST_F()
113 ASSERT_EQ(1, read(pipe_parent[0], &buf_child, 1)); in TEST_F()
146 ASSERT_EQ(0, bind(stream_server, &self->stream_address.unix_addr, in TEST_F()
148 ASSERT_EQ(0, bind(dgram_server, &self->dgram_address.unix_addr, in TEST_F()
150 ASSERT_EQ(0, listen(stream_server, backlog)); in TEST_F()
153 ASSERT_EQ(1, write(pipe_parent[1], ".", 1)); in TEST_F()
155 ASSERT_EQ(child, waitpid(child, &status, 0)); in TEST_F()
184 ASSERT_EQ(0, pipe2(pipe_child, O_CLOEXEC)); in TEST_F()
185 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in TEST_F()
205 ASSERT_EQ(1, read(pipe_parent[0], &buf, 1)); in TEST_F()
211 ASSERT_EQ(0, in TEST_F()
214 ASSERT_EQ(0, bind(dgram_server, &self->dgram_address.unix_addr, in TEST_F()
216 ASSERT_EQ(0, listen(stream_server, backlog)); in TEST_F()
219 ASSERT_EQ(1, write(pipe_child[1], ".", 1)); in TEST_F()
222 ASSERT_EQ(1, read(pipe_parent[0], &buf, 1)); in TEST_F()
236 ASSERT_EQ(1, write(pipe_parent[1], ".", 1)); in TEST_F()
244 ASSERT_EQ(1, read(pipe_child[0], &buf, 1)); in TEST_F()
260 ASSERT_EQ(1, write(pipe_parent[1], ".", 1)); in TEST_F()
264 ASSERT_EQ(child, waitpid(child, &status, 0)); in TEST_F()
316 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in TEST_F()
331 ASSERT_EQ(0, pipe2(pipe_child, O_CLOEXEC)); in TEST_F()
361 ASSERT_EQ(1, read(pipe_child[0], &buf, 1)); in TEST_F()
387 ASSERT_EQ(1, read(pipe_parent[0], &buf, 1)); in TEST_F()
425 ASSERT_EQ(0, bind(stream_server_child, in TEST_F()
428 ASSERT_EQ(0, bind(dgram_server_child, in TEST_F()
431 ASSERT_EQ(0, listen(stream_server_child, backlog)); in TEST_F()
433 ASSERT_EQ(1, write(pipe_child[1], ".", 1)); in TEST_F()
434 ASSERT_EQ(grand_child, waitpid(grand_child, &status, 0)); in TEST_F()
451 ASSERT_EQ(0, bind(stream_server_parent, in TEST_F()
454 ASSERT_EQ(0, bind(dgram_server_parent, in TEST_F()
458 ASSERT_EQ(0, listen(stream_server_parent, backlog)); in TEST_F()
460 ASSERT_EQ(1, write(pipe_parent[1], ".", 1)); in TEST_F()
461 ASSERT_EQ(child, waitpid(child, &status, 0)); in TEST_F()
535 ASSERT_EQ(0, pipe2(pipe_child, O_CLOEXEC)); in TEST_F()
536 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in TEST_F()
558 ASSERT_EQ(0, bind(stream_server, in TEST_F()
561 ASSERT_EQ(0, listen(stream_server, backlog)); in TEST_F()
562 ASSERT_EQ(1, write(pipe_child[1], ".", 1)); in TEST_F()
565 ASSERT_EQ(0, send_fd(data_socket, passed_socket)); in TEST_F()
574 ASSERT_EQ(1, read(pipe_parent[0], &buf_child, 1)); in TEST_F()
594 ASSERT_EQ(1, read(pipe_child[0], &buf_parent, 1)); in TEST_F()
595 ASSERT_EQ(0, connect(client_child, in TEST_F()
608 ASSERT_EQ(0, bind(server_socket, &self->address.unix_addr, in TEST_F()
611 ASSERT_EQ(0, listen(server_socket, backlog)); in TEST_F()
614 ASSERT_EQ(1, write(pipe_parent[1], ".", 1)); in TEST_F()
616 ASSERT_EQ(child, waitpid(child, &status, 0)); in TEST_F()
659 ASSERT_EQ(0, mkdir(TMP_DIR, 0700)); in FIXTURE_SETUP()
704 ASSERT_EQ(0, socketpair(AF_UNIX, SOCK_DGRAM, 0, unnamed_sockets)); in TEST_F()
706 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in TEST_F()
723 ASSERT_EQ(1, read(pipe_parent[0], &buf_child, 1)); in TEST_F()
727 ASSERT_EQ(1, write(unnamed_sockets[0], "a", 1)); in TEST_F()
733 ASSERT_EQ(0, connect(stream_pathname_socket, in TEST_F()
735 ASSERT_EQ(1, write(stream_pathname_socket, "b", 1)); in TEST_F()
746 ASSERT_EQ(0, connect(dgram_pathname_socket, in TEST_F()
748 ASSERT_EQ(1, write(dgram_pathname_socket, "d", 1)); in TEST_F()
762 ASSERT_EQ(1, write(stream_abstract_socket, "e", 1)); in TEST_F()
788 ASSERT_EQ(1, write(dgram_abstract_socket, "g", 1)); in TEST_F()
801 ASSERT_EQ(0, bind(stream_pathname_socket, &stream_pathname_addr, in TEST_F()
803 ASSERT_EQ(0, listen(stream_pathname_socket, backlog)); in TEST_F()
807 ASSERT_EQ(0, bind(dgram_pathname_socket, &dgram_pathname_addr, in TEST_F()
813 ASSERT_EQ(0, in TEST_F()
819 ASSERT_EQ(0, bind(dgram_abstract_socket, &dgram_abstract_addr.unix_addr, in TEST_F()
821 ASSERT_EQ(0, listen(stream_abstract_socket, backlog)); in TEST_F()
823 ASSERT_EQ(1, write(pipe_parent[1], ".", 1)); in TEST_F()
827 ASSERT_EQ(1, read(unnamed_sockets[1], &buf_parent, sizeof(buf_parent))); in TEST_F()
828 ASSERT_EQ('a', buf_parent); in TEST_F()
834 ASSERT_EQ(1, read(data_socket, &buf_parent, sizeof(buf_parent))); in TEST_F()
835 ASSERT_EQ('b', buf_parent); in TEST_F()
839 ASSERT_EQ(1, in TEST_F()
841 ASSERT_EQ('c', buf_parent); in TEST_F()
842 ASSERT_EQ(1, in TEST_F()
844 ASSERT_EQ('d', buf_parent); in TEST_F()
851 ASSERT_EQ(1, in TEST_F()
853 ASSERT_EQ('e', buf_parent); in TEST_F()
856 ASSERT_EQ(1, read(dgram_abstract_socket, &buf_parent, in TEST_F()
858 ASSERT_EQ('f', buf_parent); in TEST_F()
859 ASSERT_EQ(1, read(dgram_abstract_socket, &buf_parent, in TEST_F()
861 ASSERT_EQ('g', buf_parent); in TEST_F()
865 ASSERT_EQ(child, waitpid(child, &status, 0)); in TEST_F()
889 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in TEST()
890 ASSERT_EQ(0, pipe2(pipe_child, O_CLOEXEC)); in TEST()
906 ASSERT_EQ(1, read(pipe_parent[0], &buf, 1)); in TEST()
907 ASSERT_EQ(0, in TEST()
915 ASSERT_EQ(1, send(client_conn_socket, ".", 1, 0)); in TEST()
916 ASSERT_EQ(1, sendto(client_unconn_socket, ".", 1, 0, in TEST()
919 ASSERT_EQ(1, write(pipe_child[1], ".", 1)); in TEST()
929 ASSERT_EQ(1, send(client_conn_socket, ".", 1, 0)); in TEST()
930 ASSERT_EQ(-1, sendto(client_unconn_socket, ".", 1, 0, in TEST()
933 ASSERT_EQ(EPERM, errno); in TEST()
934 ASSERT_EQ(1, write(pipe_child[1], ".", 1)); in TEST()
949 ASSERT_EQ(0, bind(server_conn_socket, &connected_addr.unix_addr, in TEST()
951 ASSERT_EQ(0, bind(server_unconn_socket, &non_connected_addr.unix_addr, in TEST()
953 ASSERT_EQ(1, write(pipe_parent[1], ".", 1)); in TEST()
956 ASSERT_EQ(1, read(pipe_child[0], &buf, 1)); in TEST()
957 ASSERT_EQ(1, recv(server_conn_socket, &buf, 1, 0)); in TEST()
958 ASSERT_EQ(1, recv(server_unconn_socket, &buf, 1, 0)); in TEST()
964 ASSERT_EQ(1, read(pipe_child[0], &buf, 1)); in TEST()
965 ASSERT_EQ(1, recv(server_conn_socket, &buf, 1, 0)); in TEST()
968 ASSERT_EQ(child, waitpid(child, &status, 0)); in TEST()
994 ASSERT_EQ(0, bind(connected_socket, &connected_addr.unix_addr, in TEST()
996 ASSERT_EQ(0, bind(non_connected_socket, &non_connected_addr.unix_addr, in TEST()
1010 ASSERT_EQ(-1, in TEST()
1013 ASSERT_EQ(EPERM, errno); in TEST()
1015 ASSERT_EQ(-1, sendto(connected_socket, ".", 1, 0, in TEST()
1018 ASSERT_EQ(EPERM, errno); in TEST()
1020 ASSERT_EQ(-1, sendto(non_connected_socket, ".", 1, 0, in TEST()
1023 ASSERT_EQ(EPERM, errno); in TEST()
1032 ASSERT_EQ(child, waitpid(child, &status, 0)); in TEST()