Lines Matching refs:fd

46     int fd = 0;

47 EXPECT_NE((fd = open(FILE0, O_CREAT | O_RDWR, 0777)), -1) << "> open faild errno = " << errno;
48 WriteCloseTest(fd);
52 EXPECT_NE((fd = open(FILE0, O_RDONLY, 0777)), -1) << "> open faild errno = " << errno;
54 EXPECT_EQ((fdNew = fcntl(fd, F_DUPFD)), -1) << "> fcntl errno = " << errno;
58 EXPECT_NE(close(fd), -1) << "> close errno = " << errno;
69 int fd = 0;
70 EXPECT_NE((fd = open(FILE0, O_CREAT | O_RDWR, 0777)), -1) << "> open faild errno = " << errno;
71 WriteCloseTest(fd);
74 EXPECT_NE((fd = open(FILE0, flagReadWrite, 0777)), -1) << "> open faild errno = " << errno;
78 EXPECT_NE((flagGet = fcntl(fd, F_GETFL)), -1) << "> fcntl errno = " << errno;
80 EXPECT_NE(close(fd), -1) << "> close errno = " << errno;
90 int fd = 0;
91 EXPECT_NE((fd = open(FILE0, O_CREAT | O_RDWR, 0777)), -1) << "> open faild errno = " << errno;
92 WriteCloseTest(fd);
95 EXPECT_NE((fd = open(FILE0, flagReadWrite, 0777)), -1) << "> open faild errno = " << errno;
98 int flagSet = fcntl(fd, F_GETFL) | O_APPEND | O_NONBLOCK;
99 EXPECT_NE(fcntl(fd, F_SETFL, flagSet), -1) << "> fcntl errno = " << errno;
102 int flagGet = fcntl(fd, F_GETFL);
106 EXPECT_NE(close(fd), -1) << "> close errno = " << errno;
117 int fd = 0;
123 fd = open(FILE0, O_CREAT | O_RDWR, 0777);
124 EXPECT_NE(fd, -1) << "> open faild errno = " << errno;
125 EXPECT_NE(write(fd, writeBuf, 20), -1) << "> write errno = " << errno;
128 reLseek = lseek(fd, 0, SEEK_CUR);
133 EXPECT_NE(write(fd, writeBuf, 20), -1) << "> write errno = " << errno;
134 reLseek = lseek(fd, 0, SEEK_CUR);
138 EXPECT_NE(close(fd), -1) << "> close errno = " << errno;
149 int fd = 0;
155 fd = open(FILE0, O_CREAT | O_RDWR, 0777);
156 EXPECT_NE(fd, -1) << "> open faild errno = " << errno;
157 EXPECT_NE(write(fd, writeBuf, 20), -1) << "> write errno = " << errno;
160 reLseek = lseek(fd, 0, SEEK_SET);
165 reLseek = lseek(fd, 10, SEEK_SET);
169 EXPECT_NE(close(fd), -1) << "> close errno = " << errno;
180 int fd = 0;
186 fd = open(FILE0, O_CREAT | O_RDWR, 0777);
187 EXPECT_NE(fd, -1) << "> open faild errno = " << errno;
188 EXPECT_NE(write(fd, writeBuf, 20), -1) << "> write errno = " << errno;
191 reLseek = lseek(fd, -10, SEEK_END);
195 EXPECT_NE(close(fd), -1) << "> close errno = " << errno;
216 int fd = open(FILE0, O_RDWR | O_CREAT | O_EXCL, 0777);
217 ASSERT_NE(fd, -1) << "> open faild errno = " << errno;
218 EXPECT_NE(write(fd, writeBuf, sizeof(writeBuf)), -1) << "> write errno = " << errno;
220 int reInt = fallocate(fd, FALLOC_FL_KEEP_SIZE, 0, file_size);
222 EXPECT_NE(close(fd), -1) << "> close errno = " << errno;
262 int fd = open(FILE0, O_RDWR | O_CREAT | O_EXCL, 0777);
263 ASSERT_NE(fd, -1) << "> open faild errno = " << errno;
264 EXPECT_NE(write(fd, writeBuf, sizeof(writeBuf)), -1) << "> write errno = " << errno;
266 int reInt = fallocate(fd, FALLOC_FL_KEEP_SIZE, 0, file_size);
268 EXPECT_NE(close(fd), -1) << "> close errno = " << errno;
297 int fd = open(FILE0, O_RDWR | O_CREAT | O_EXCL, 0777);
298 EXPECT_NE(fd, -1) << "> open faild errno = " << errno;
299 EXPECT_NE(close(fd), -1) << "> close errno = " << errno;
309 int fd = 0;
310 fd = creat(FILE0, 0777);
311 EXPECT_NE(fd, -1) << "> creat faild errno = " << errno;
312 EXPECT_NE(close(fd), -1) << "> close errno = " << errno;
314 fd = open(FILE0, O_RDWR | O_CREAT | O_EXCL, 0777);
315 EXPECT_EQ(fd, -1) << "> Should open failed";
317 close(fd);
327 int fd = 0;
330 fd = open(DIR0, O_RDWR, 0777);
331 if (fd != -1) {
333 close(fd);
344 int fd = 0;
346 fd = open(FILE0, O_RDWR, 0777);
347 EXPECT_EQ(fd, -1) << "> Should open failed";
349 close(fd);
359 int fd = 0;
369 fd = open(fileName, O_RDWR | O_CREAT | O_EXCL, 0777);
370 EXPECT_EQ(fd, -1) << "> Should open failed";
372 close(fd);