Lines Matching refs:f

53 	FILE *f;  in ATF_TC_BODY()  local
65 f = fdopen(fd, "w+"); in ATF_TC_BODY()
67 ATF_REQUIRE(f != NULL); in ATF_TC_BODY()
68 ATF_REQUIRE(fclose(f) == 0); in ATF_TC_BODY()
121 FILE *f; in ATF_TC_BODY() local
135 f = fdopen(fd, "r+"); in ATF_TC_BODY()
137 ATF_REQUIRE(f != NULL); in ATF_TC_BODY()
138 ATF_REQUIRE(ftell(f) == 3); in ATF_TC_BODY()
139 ATF_REQUIRE(fclose(f) == 0); in ATF_TC_BODY()
161 FILE *f; in ATF_TC_BODY() local
163 f = fopen(path, "w+"); in ATF_TC_BODY()
165 ATF_REQUIRE(f != NULL); in ATF_TC_BODY()
166 ATF_REQUIRE(fclose(f) == 0); in ATF_TC_BODY()
176 f = fopen(path, mode[i]); in ATF_TC_BODY()
178 if (f == NULL && errno == EINVAL) in ATF_TC_BODY()
181 if (f != NULL) in ATF_TC_BODY()
182 (void)fclose(f); in ATF_TC_BODY()
214 FILE *f; in ATF_TC_BODY() local
218 f = fopen(path, "w+"); in ATF_TC_BODY()
220 ATF_REQUIRE(f != NULL); in ATF_TC_BODY()
221 ATF_REQUIRE(fwrite("garbage", 1, 7, f) == 7); in ATF_TC_BODY()
222 ATF_REQUIRE(fclose(f) == 0); in ATF_TC_BODY()
224 f = fopen(path, "a"); in ATF_TC_BODY()
226 ATF_REQUIRE(fwrite("garbage", 1, 7, f) == 7); in ATF_TC_BODY()
227 ATF_REQUIRE(fclose(f) == 0); in ATF_TC_BODY()
229 f = fopen(path, "r"); in ATF_TC_BODY()
231 ATF_REQUIRE(fread(buf, 1, sizeof(buf), f) == 14); in ATF_TC_BODY()
234 ATF_REQUIRE(fclose(f) == 0); in ATF_TC_BODY()
252 FILE *f; in ATF_TC_BODY() local
261 f = fopen(path, "w+"); in ATF_TC_BODY()
263 ATF_REQUIRE(f != NULL); in ATF_TC_BODY()
264 ATF_REQUIRE(fclose(f) == 0); in ATF_TC_BODY()
271 f = fopen(path, mode[i]); in ATF_TC_BODY()
273 if (f != NULL) { in ATF_TC_BODY()
274 ATF_REQUIRE(fclose(f) == 0); in ATF_TC_BODY()
319 FILE *f; in ATF_TC_BODY() local
326 f = fopen(devs[i], mode[j]); in ATF_TC_BODY()
328 if (f == NULL && errno == EFTYPE) in ATF_TC_BODY()
331 if (f != NULL) in ATF_TC_BODY()
332 (void)fclose(f); in ATF_TC_BODY()
349 FILE *f; in ATF_TC_BODY() local
351 f = fopen(path, "w+"); in ATF_TC_BODY()
353 ATF_REQUIRE(f != NULL); in ATF_TC_BODY()
354 ATF_REQUIRE(fwrite("garbage", 1, 7, f) == 7); in ATF_TC_BODY()
355 ATF_REQUIRE(fclose(f) == 0); in ATF_TC_BODY()
361 f = fopen(path, "r"); in ATF_TC_BODY()
363 ATF_REQUIRE(f != NULL); in ATF_TC_BODY()
364 ATF_REQUIRE(ftello(f) == 0); in ATF_TC_BODY()
365 ATF_REQUIRE(fclose(f) == 0); in ATF_TC_BODY()
367 f = fopen(path, "a"); in ATF_TC_BODY()
369 ATF_REQUIRE(f != NULL); in ATF_TC_BODY()
370 ATF_REQUIRE(ftello(f) == 7); in ATF_TC_BODY()
371 ATF_REQUIRE(fclose(f) == 0); in ATF_TC_BODY()
391 FILE *f; in ATF_TC_BODY() local
402 f = fopen(path, "w+"); in ATF_TC_BODY()
403 ATF_REQUIRE(f != NULL); in ATF_TC_BODY()
405 f = freopen(path, "w+", std[i]); in ATF_TC_BODY()
406 ATF_REQUIRE(f != NULL); in ATF_TC_BODY()
408 ATF_REQUIRE(fwrite("garbage", 1, 7, f) == 7); in ATF_TC_BODY()
410 ATF_REQUIRE(fclose(f) == 0); in ATF_TC_BODY()
412 f = fopen(path, "r"); in ATF_TC_BODY()
414 ATF_REQUIRE(f != NULL); in ATF_TC_BODY()
415 ATF_REQUIRE(fread(buf, 1, sizeof(buf), f) == 14); in ATF_TC_BODY()
418 ATF_REQUIRE(fclose(f) == 0); in ATF_TC_BODY()