Lines Matching refs:write
29 // write() and read() should work.
31 status = write(fds[0], buf, 4);
32 if (status < 0) printf("write failed %s\n", strerror(errno));
33 EXPECT_EQ(status, 4, "write failed");
40 EXPECT_EQ(memcmp(buf, recvbuf, 4), 0, "data did not make it after write+read");
81 EXPECT_EQ(write(fds[0], buf, sizeof(buf)), 1, "fds[0] should be initially writable");
82 EXPECT_EQ(write(fds[1], buf, sizeof(buf)), 1, "fds[1] should be initially writable");
105 EXPECT_EQ(write(fds[1], buf, sizeof(buf)), 1, "");
148 EXPECT_EQ(send(fds[0], buf, sizeof(buf), SEND_FLAGS), -1, "write after SHUT_WR");
149 EXPECT_EQ(errno, EPIPE, "errno after write after SHUT_WR");
151 // Should still be able to write + read a message in the other direction.
152 EXPECT_EQ(write(fds[1], buf, sizeof(buf)), 1, "");
177 EXPECT_EQ(errno, EPIPE, "errno after write after SHUT_RDWR");