Lines Matching refs:fd
45 int fd = open(TEST_FILE, O_WRONLY | O_CREAT, 0644);
46 write(fd, TEST_DATA, TEST_LEN);
47 close(fd);
70 int fd = open(TEST_FILE, O_WRONLY | O_CREAT, 0644);
71 EXPECT_TRUE(fd > 0);
75 off_t pos = lseek(fd, offset, SEEK_SET);
80 pos = lseek(fd, offset, SEEK_SET);
85 pos = lseek(fd, offset, SEEK_SET);
91 pos = lseek(fd, offset, SEEK_SET);
94 close(fd);
107 int fd = open(TEST_FILE, O_WRONLY | O_CREAT, 0644);
108 EXPECT_TRUE(fd > 0);
113 off_t pos = lseek(fd, offset, SEEK_SET);
116 close(fd);
129 int fd = open(TEST_FILE, O_WRONLY | O_CREAT, 0644);
130 EXPECT_TRUE(fd > 0);
134 off_t initPos = lseek(fd, start, SEEK_SET);
139 off_t pos = lseek(fd, offset, SEEK_CUR);
145 pos = lseek(fd, offset, SEEK_CUR);
151 pos = lseek(fd, offset, SEEK_CUR);
154 close(fd);
167 int fd = open(TEST_FILE, O_WRONLY | O_CREAT, 0644);
168 EXPECT_TRUE(fd > 0);
173 off_t pos = lseek(fd, offset, SEEK_CUR);
177 close(fd);
190 int fd = open(TEST_FILE, O_WRONLY | O_CREAT, 0644);
191 EXPECT_TRUE(fd > 0);
193 off_t pos = lseek(fd, 0, SEEK_END);
196 close(fd);
202 * @tc.desc : lseek used invalid fd test failed, errno EBADF.