Lines Matching refs:dfd

78 	int dfd;  in ATF_TC_BODY()  local
85 ATF_REQUIRE((dfd = open(DIR, O_RDONLY, 0)) != -1); in ATF_TC_BODY()
87 ATF_REQUIRE((fd = openat(dfd, BASEFILE, O_RDWR, 0)) != -1); in ATF_TC_BODY()
90 ATF_REQUIRE(fchmod(dfd, 0644) == 0); in ATF_TC_BODY()
92 ATF_REQUIRE((fd = openat(dfd, BASEFILE, O_RDWR, 0)) == -1); in ATF_TC_BODY()
95 ATF_REQUIRE(close(dfd) == 0); in ATF_TC_BODY()
108 int dfd; in ATF_TC_BODY() local
115 ATF_REQUIRE((dfd = open(DIR, O_RDONLY|O_SEARCH, 0)) != -1); in ATF_TC_BODY()
117 ATF_REQUIRE((fd = openat(dfd, BASEFILE, O_RDWR, 0)) != -1); in ATF_TC_BODY()
120 ATF_REQUIRE(fchmod(dfd, 0644) == 0); in ATF_TC_BODY()
122 ATF_REQUIRE((fd = openat(dfd, BASEFILE, O_RDWR, 0)) != -1); in ATF_TC_BODY()
125 ATF_REQUIRE(fchmod(dfd, 0444) == 0); in ATF_TC_BODY()
127 ATF_REQUIRE((fd = openat(dfd, BASEFILE, O_RDWR, 0)) != -1); in ATF_TC_BODY()
129 ATF_REQUIRE(close(dfd) == 0); in ATF_TC_BODY()
140 int dfd; in ATF_TC_BODY() local
147 ATF_REQUIRE((dfd = open(DIR, O_RDONLY|O_SEARCH, 0)) != -1); in ATF_TC_BODY()
149 ATF_REQUIRE((fd = openat(dfd, BASEFILE, O_RDWR, 0)) != -1); in ATF_TC_BODY()
152 ATF_REQUIRE(fchmod(dfd, 0644) == 0); in ATF_TC_BODY()
154 ATF_REQUIRE((fd = openat(dfd, BASEFILE, O_RDWR, 0)) != -1); in ATF_TC_BODY()
157 ATF_REQUIRE(fchmod(dfd, 0444) == 0); in ATF_TC_BODY()
159 ATF_REQUIRE((fd = openat(dfd, BASEFILE, O_RDWR, 0)) != -1); in ATF_TC_BODY()
161 ATF_REQUIRE(close(dfd) == 0); in ATF_TC_BODY()
174 int dfd; in ATF_TC_BODY() local
180 ATF_REQUIRE((dfd = open(DIR, O_RDONLY, 0)) != -1); in ATF_TC_BODY()
182 ATF_REQUIRE(faccessat(dfd, BASEFILE, W_OK, 0) == 0); in ATF_TC_BODY()
184 ATF_REQUIRE(fchmod(dfd, 0644) == 0); in ATF_TC_BODY()
186 ATF_REQUIRE(faccessat(dfd, BASEFILE, W_OK, 0) == -1); in ATF_TC_BODY()
189 ATF_REQUIRE(close(dfd) == 0); in ATF_TC_BODY()
202 int dfd; in ATF_TC_BODY() local
209 ATF_REQUIRE((dfd = open(DIR, O_RDONLY|O_SEARCH, 0)) != -1); in ATF_TC_BODY()
211 ATF_REQUIRE(faccessat(dfd, BASEFILE, W_OK, 0) == 0); in ATF_TC_BODY()
213 ATF_REQUIRE(fchmod(dfd, 0644) == 0); in ATF_TC_BODY()
215 ATF_REQUIRE(faccessat(dfd, BASEFILE, W_OK, 0) == 0); in ATF_TC_BODY()
217 ATF_REQUIRE(fchmod(dfd, 0444) == 0); in ATF_TC_BODY()
219 ATF_REQUIRE(faccessat(dfd, BASEFILE, W_OK, 0) == 0); in ATF_TC_BODY()
221 ATF_REQUIRE(close(dfd) == 0); in ATF_TC_BODY()
232 int dfd; in ATF_TC_BODY() local
239 ATF_REQUIRE((dfd = open(DIR, O_RDONLY|O_SEARCH, 0)) != -1); in ATF_TC_BODY()
241 ATF_REQUIRE(faccessat(dfd, BASEFILE, W_OK, 0) == 0); in ATF_TC_BODY()
243 ATF_REQUIRE(fchmod(dfd, 0644) == 0); in ATF_TC_BODY()
245 ATF_REQUIRE(faccessat(dfd, BASEFILE, W_OK, 0) == 0); in ATF_TC_BODY()
247 ATF_REQUIRE(fchmod(dfd, 0444) == 0); in ATF_TC_BODY()
249 ATF_REQUIRE(faccessat(dfd, BASEFILE, W_OK, 0) == 0); in ATF_TC_BODY()
251 ATF_REQUIRE(close(dfd) == 0); in ATF_TC_BODY()
264 int dfd; in ATF_TC_BODY() local
268 ATF_REQUIRE((dfd = open(FILE, O_CREAT|O_SEARCH, 0644)) != -1); in ATF_TC_BODY()
269 ATF_REQUIRE((fd = openat(dfd, BASEFILE, O_RDWR, 0)) == -1); in ATF_TC_BODY()
271 ATF_REQUIRE(close(dfd) == 0); in ATF_TC_BODY()
283 int dfd, fd; in ATF_TC_BODY() local
290 ATF_REQUIRE((dfd = open(DIR, O_SEARCH, 0)) != -1); in ATF_TC_BODY()
292 ATF_REQUIRE(faccessat(dfd, BASEFILE, W_OK, 0) != -1); in ATF_TC_BODY()
294 ATF_REQUIRE(close(dfd) == 0); in ATF_TC_BODY()
305 int dfd; in ATF_TC_BODY() local
308 ATF_REQUIRE((dfd = open(DIR, O_SEARCH, 0)) != -1); in ATF_TC_BODY()
309 ATF_REQUIRE(getdents(dfd, buf, sizeof(buf)) < 0); in ATF_TC_BODY()
310 ATF_REQUIRE(close(dfd) == 0); in ATF_TC_BODY()
323 int dfd, fd; in ATF_TC_BODY() local
329 ATF_REQUIRE((dfd = open(DIR, O_SEARCH, 0)) != -1); in ATF_TC_BODY()
334 fstatvfs(dfd, &vst); in ATF_TC_BODY()
338 ATF_REQUIRE(fstatat(dfd, BASEFILE, &sb, 0) == 0); in ATF_TC_BODY()
340 ATF_REQUIRE(close(dfd) == 0); in ATF_TC_BODY()