Lines Matching refs:fd
361 write_all(int fd, const void *buf, size_t nbytes) in write_all() argument
366 r = write(fd, buf, nbytes); in write_all()
383 int fd; variable
395 fd = open("abspath.txt", O_CREAT | O_RDONLY, 0644);
396 ATF_REQUIRE(fd >= 0);
397 close(fd);
426 int fd; variable
429 fd = open("small.txt", O_RDWR | O_CREAT, 0644);
430 ATF_REQUIRE(fd >= 0);
431 write_all(fd, contents, strlen(contents) + 1);
432 close(fd);
444 int fd; variable
447 fd = open("small.txt", O_RDWR | O_CREAT, 0644);
448 ATF_REQUIRE(fd >= 0);
449 write_all(fd, contents, strlen(contents) + 1);
450 close(fd);
467 int fd; variable
475 fd = open("medium.txt", O_RDWR | O_CREAT, 0644);
476 ATF_REQUIRE(fd >= 0);
477 write_all(fd, contents, sizeof(contents));
478 close(fd);
498 int fd; variable
505 fd = open("medium.txt", O_RDWR | O_CREAT, 0644);
506 ATF_REQUIRE(fd >= 0);
507 write_all(fd, contents, sizeof(contents));
508 close(fd);
525 int fd; variable
527 fd = open("empty.txt", O_CREAT | O_RDONLY, 0000);
528 ATF_REQUIRE(fd >= 0);
529 close(fd);
540 int fd; variable
542 fd = open("empty.txt", O_CREAT | O_RDONLY, 0644);
543 ATF_REQUIRE(fd >= 0);
544 close(fd);
556 int fd; variable
563 fd = open("medium.txt", O_RDWR | O_CREAT, 0644);
564 ATF_REQUIRE(fd >= 0);
565 write_all(fd, contents, sizeof(contents));
566 close(fd);
580 int fd; variable
588 fd = open("unix.txt", O_RDWR | O_CREAT, 0644);
589 ATF_REQUIRE(fd >= 0);
590 write_all(fd, contents, strlen(contents) + 1);
591 close(fd);
641 int fd; variable
644 fd = open("small.txt", O_RDWR | O_CREAT, 0644);
645 ATF_REQUIRE(fd >= 0);
646 write_all(fd, contents, strlen(contents) + 1);
647 close(fd);
687 int fd; variable
699 fd = open("small.txt", O_RDONLY);
700 ATF_REQUIRE(fd >= 0);
701 r = read(fd, buffer, sizeof(buffer));
702 close(fd);
711 int fd; variable
720 fd = open("medium.txt", O_RDWR | O_CREAT, 0666);
721 ATF_REQUIRE(fd >= 0);
722 close(fd);
736 fd = open("medium.txt", O_RDONLY);
737 ATF_REQUIRE(fd >= 0);
738 r = read(fd, buffer, sizeof(buffer));
739 close(fd);
748 int fd; variable
754 fd = open("small.txt", O_RDWR | O_CREAT, 0666);
755 ATF_REQUIRE(fd >= 0);
756 close(fd);
769 fd = open("small.txt", O_RDONLY);
770 ATF_REQUIRE(fd >= 0);
771 r = read(fd, buffer, sizeof(buffer));
772 close(fd);
781 int fd; variable
790 fd = open("medium.txt", O_RDWR | O_CREAT, 0666);
791 ATF_REQUIRE(fd >= 0);
792 close(fd);
803 fd = open("medium.txt", O_RDONLY);
804 ATF_REQUIRE(fd >= 0);
805 r = read(fd, buffer, sizeof(buffer));
806 close(fd);
815 int fd; variable
817 fd = open("empty.txt", O_CREAT | O_RDONLY, 0440);
818 ATF_REQUIRE(fd >= 0);
819 close(fd);
831 int fd; variable
833 fd = open("empty.txt", O_CREAT | O_RDONLY, 0444);
834 ATF_REQUIRE(fd >= 0);
835 close(fd);
847 int fd; variable
856 fd = open("medium.txt", O_RDWR | O_CREAT, 0666);
857 ATF_REQUIRE(fd >= 0);
858 close(fd);
867 fd = open("medium.txt", O_RDONLY);
868 ATF_REQUIRE(fd >= 0);
869 r = read(fd, buffer, sizeof(buffer));
870 close(fd);
879 int fd; variable
890 fd = open("unix.txt", O_RDWR | O_CREAT, 0666);
891 ATF_REQUIRE(fd >= 0);
892 close(fd);
900 fd = open("unix.txt", O_RDONLY);
901 ATF_REQUIRE(fd >= 0);
902 r = read(fd, buffer, sizeof(buffer));
903 close(fd);
922 int fd; variable
928 fd = open("small.txt", O_RDWR | O_CREAT, 0666);
929 ATF_REQUIRE(fd >= 0);
930 close(fd);
938 fd = open("small.txt", O_RDONLY);
939 ATF_REQUIRE(fd >= 0);
940 r = read(fd, buffer, sizeof(buffer));
941 close(fd);
950 int fd; variable
954 fd = open("small.txt", O_RDWR | O_CREAT, 0666);
955 ATF_REQUIRE(fd >= 0);
956 write_all(fd, contents, strlen(contents) + 1);
957 close(fd);