Lines Matching refs:files

43 static char *files[MAX_FILES];  variable
62 files[i] = calloc(1, sizeof(template)); in prepare_files()
63 ATF_REQUIRE(files[i] != NULL); in prepare_files()
64 strncpy(files[i], template, sizeof(template) - 1); in prepare_files()
67 fds[i] = mkstemp(files[i]); in prepare_files()
71 ATF_REQUIRE(mktemp(files[i]) != NULL); in prepare_files()
82 for (i = 0; files[i] != NULL; i++) { in clear_files()
83 unlink(files[i]); in clear_files()
84 free(files[i]); in clear_files()
296 fa = fileargs_init(MAX_FILES, files, O_RDONLY, 0, &rights, in ATF_TC_BODY()
303 ATF_REQUIRE(test_file_open(fa, files[i], &fd) == 0); in ATF_TC_BODY()
306 ATF_REQUIRE(test_file_open(fa, files[i], &fd) == 0); in ATF_TC_BODY()
312 ATF_REQUIRE(test_file_lstat(fa, files[i]) == ENOTCAPABLE); in ATF_TC_BODY()
316 ATF_REQUIRE(test_file_realpath(fa, files[i]) == ENOTCAPABLE); in ATF_TC_BODY()
343 fa = fileargs_init(MAX_FILES, files, O_WRONLY, 0, &rights, in ATF_TC_BODY()
350 ATF_REQUIRE(test_file_open(fa, files[i], &fd) == 0); in ATF_TC_BODY()
353 ATF_REQUIRE(test_file_open(fa, files[i], &fd) == 0); in ATF_TC_BODY()
359 ATF_REQUIRE(test_file_lstat(fa, files[i]) == ENOTCAPABLE); in ATF_TC_BODY()
363 ATF_REQUIRE(test_file_realpath(fa, files[i]) == ENOTCAPABLE); in ATF_TC_BODY()
390 fa = fileargs_init(MAX_FILES, files, O_RDWR | O_CREAT, 666, in ATF_TC_BODY()
396 ATF_REQUIRE(test_file_open(fa, files[i], &fd) == 0); in ATF_TC_BODY()
404 ATF_REQUIRE(test_file_lstat(fa, files[i]) == ENOTCAPABLE); in ATF_TC_BODY()
407 ATF_REQUIRE(test_file_realpath(fa, files[i]) == ENOTCAPABLE); in ATF_TC_BODY()
437 fa = fileargs_cinit(capcas, MAX_FILES, files, O_RDONLY, 0, &rights, in ATF_TC_BODY()
443 ATF_REQUIRE(test_file_open(fa, files[i], &fd) == 0); in ATF_TC_BODY()
471 fa = fileargs_init(MAX_FILES, files, O_RDONLY, 0, &rights, in ATF_TC_BODY()
478 ATF_REQUIRE(test_file_fopen(fa, files[i], "r", &pfile) == 0); in ATF_TC_BODY()
481 ATF_REQUIRE(test_file_fopen(fa, files[i], "r", &pfile) == 0); in ATF_TC_BODY()
488 ATF_REQUIRE(test_file_lstat(fa, files[i]) == ENOTCAPABLE); in ATF_TC_BODY()
493 ATF_REQUIRE(test_file_realpath(fa, files[i]) == ENOTCAPABLE); in ATF_TC_BODY()
521 fa = fileargs_init(MAX_FILES, files, O_WRONLY, 0, &rights, in ATF_TC_BODY()
528 ATF_REQUIRE(test_file_fopen(fa, files[i], "w", &pfile) == 0); in ATF_TC_BODY()
531 ATF_REQUIRE(test_file_fopen(fa, files[i], "w", &pfile) == 0); in ATF_TC_BODY()
538 ATF_REQUIRE(test_file_lstat(fa, files[i]) == ENOTCAPABLE); in ATF_TC_BODY()
543 ATF_REQUIRE(test_file_realpath(fa, files[i]) == ENOTCAPABLE); in ATF_TC_BODY()
570 fa = fileargs_init(MAX_FILES, files, O_RDWR | O_CREAT, 0, &rights, in ATF_TC_BODY()
577 ATF_REQUIRE(test_file_fopen(fa, files[i], "w+", &pfile) == 0); in ATF_TC_BODY()
585 ATF_REQUIRE(test_file_lstat(fa, files[i]) == ENOTCAPABLE); in ATF_TC_BODY()
588 ATF_REQUIRE(test_file_realpath(fa, files[i]) == ENOTCAPABLE); in ATF_TC_BODY()
612 fa = fileargs_init(MAX_FILES, files, 0, 0, NULL, FA_LSTAT); in ATF_TC_BODY()
617 ATF_REQUIRE(test_file_lstat(fa, files[i]) == 0); in ATF_TC_BODY()
620 ATF_REQUIRE(test_file_open(fa, files[i], &fd) == ENOTCAPABLE); in ATF_TC_BODY()
623 ATF_REQUIRE(test_file_realpath(fa, files[i]) == ENOTCAPABLE); in ATF_TC_BODY()
642 fa = fileargs_init(MAX_FILES, files, 0, 0, NULL, FA_REALPATH); in ATF_TC_BODY()
647 ATF_REQUIRE(test_file_realpath(fa, files[i]) == 0); in ATF_TC_BODY()
650 ATF_REQUIRE(test_file_open(fa, files[i], &fd) == ENOTCAPABLE); in ATF_TC_BODY()
651 ATF_REQUIRE(test_file_lstat(fa, files[i]) == ENOTCAPABLE); in ATF_TC_BODY()
677 fa = fileargs_init(MAX_FILES, files, O_RDONLY, 0, &rights, in ATF_TC_BODY()
684 ATF_REQUIRE(test_file_lstat(fa, files[i]) == 0); in ATF_TC_BODY()
685 ATF_REQUIRE(test_file_open(fa, files[i], &fd) == 0); in ATF_TC_BODY()
688 ATF_REQUIRE(test_file_open(fa, files[i], &fd) == 0); in ATF_TC_BODY()
689 ATF_REQUIRE(test_file_lstat(fa, files[i]) == 0); in ATF_TC_BODY()
698 ATF_REQUIRE(test_file_realpath(fa, files[i]) == ENOTCAPABLE); in ATF_TC_BODY()
725 fa = fileargs_init(MAX_FILES, files, O_RDONLY, 0, &rights, in ATF_TC_BODY()
732 ATF_REQUIRE(test_file_realpath(fa, files[i]) == 0); in ATF_TC_BODY()
733 ATF_REQUIRE(test_file_open(fa, files[i], &fd) == 0); in ATF_TC_BODY()
736 ATF_REQUIRE(test_file_open(fa, files[i], &fd) == 0); in ATF_TC_BODY()
737 ATF_REQUIRE(test_file_realpath(fa, files[i]) == 0); in ATF_TC_BODY()
746 ATF_REQUIRE(test_file_lstat(fa, files[i]) == ENOTCAPABLE); in ATF_TC_BODY()