Lines Matching refs:fd

432 write_all(int fd, const void *buf, size_t nbytes)  in write_all()  argument
437 r = write(fd, buf, nbytes); in write_all()
454 int fd; variable
466 fd = open("abspath.txt", O_CREAT | O_RDONLY, 0644);
467 ATF_REQUIRE(fd >= 0);
468 close(fd);
498 int fd; variable
501 fd = open("small.txt", O_RDWR | O_CREAT, 0644);
502 ATF_REQUIRE(fd >= 0);
503 write_all(fd, contents, strlen(contents) + 1);
504 close(fd);
516 int fd; variable
519 fd = open("small.txt", O_RDWR | O_CREAT, 0644);
520 ATF_REQUIRE(fd >= 0);
521 write_all(fd, contents, strlen(contents) + 1);
522 close(fd);
539 int fd; variable
547 fd = open("medium.txt", O_RDWR | O_CREAT, 0644);
548 ATF_REQUIRE(fd >= 0);
549 write_all(fd, contents, sizeof(contents));
550 close(fd);
570 int fd; variable
577 fd = open("medium.txt", O_RDWR | O_CREAT, 0644);
578 ATF_REQUIRE(fd >= 0);
579 write_all(fd, contents, sizeof(contents));
580 close(fd);
597 int fd; variable
599 fd = open("empty.txt", O_CREAT | O_RDONLY, 0000);
600 ATF_REQUIRE(fd >= 0);
601 close(fd);
612 int fd; variable
614 fd = open("empty.txt", O_CREAT | O_RDONLY, 0644);
615 ATF_REQUIRE(fd >= 0);
616 close(fd);
628 int fd; variable
635 fd = open("medium.txt", O_RDWR | O_CREAT, 0644);
636 ATF_REQUIRE(fd >= 0);
637 write_all(fd, contents, sizeof(contents));
638 close(fd);
652 int fd; variable
660 fd = open("medium.txt", O_RDWR | O_CREAT, 0644);
661 ATF_REQUIRE(fd >= 0);
662 write_all(fd, contents, sizeof(contents));
663 close(fd);
678 int fd; variable
686 fd = open("unix.txt", O_RDWR | O_CREAT, 0644);
687 ATF_REQUIRE(fd >= 0);
688 write_all(fd, contents, strlen(contents) + 1);
689 close(fd);
739 int fd; variable
742 fd = open("small.txt", O_RDWR | O_CREAT, 0644);
743 ATF_REQUIRE(fd >= 0);
744 write_all(fd, contents, strlen(contents) + 1);
745 close(fd);
757 int fd; variable
767 fd = open("rfc7440.txt", O_RDWR | O_CREAT, 0644);
768 ATF_REQUIRE(fd >= 0);
769 write_all(fd, contents, sizeof(contents));
770 close(fd);
838 int fd; variable
850 fd = open("small.txt", O_RDONLY);
851 ATF_REQUIRE(fd >= 0);
852 r = read(fd, buffer, sizeof(buffer));
854 close(fd);
863 int fd; variable
872 fd = open("medium.txt", O_RDWR | O_CREAT, 0666);
873 ATF_REQUIRE(fd >= 0);
874 close(fd);
888 fd = open("medium.txt", O_RDONLY);
889 ATF_REQUIRE(fd >= 0);
890 r = read(fd, buffer, sizeof(buffer));
892 close(fd);
901 int fd; variable
907 fd = open("small.txt", O_RDWR | O_CREAT, 0666);
908 ATF_REQUIRE(fd >= 0);
909 close(fd);
922 fd = open("small.txt", O_RDONLY);
923 ATF_REQUIRE(fd >= 0);
924 r = read(fd, buffer, sizeof(buffer));
926 close(fd);
935 int fd; variable
944 fd = open("medium.txt", O_RDWR | O_CREAT, 0666);
945 ATF_REQUIRE(fd >= 0);
946 close(fd);
957 fd = open("medium.txt", O_RDONLY);
958 ATF_REQUIRE(fd >= 0);
959 r = read(fd, buffer, sizeof(buffer));
961 close(fd);
970 int fd; variable
972 fd = open("empty.txt", O_CREAT | O_RDONLY, 0440);
973 ATF_REQUIRE(fd >= 0);
974 close(fd);
986 int fd; variable
988 fd = open("empty.txt", O_CREAT | O_RDONLY, 0444);
989 ATF_REQUIRE(fd >= 0);
990 close(fd);
1002 int fd; variable
1011 fd = open("medium.txt", O_RDWR | O_CREAT, 0666);
1012 ATF_REQUIRE(fd >= 0);
1013 close(fd);
1022 fd = open("medium.txt", O_RDONLY);
1023 ATF_REQUIRE(fd >= 0);
1024 r = read(fd, buffer, sizeof(buffer));
1026 close(fd);
1035 int fd; variable
1045 fd = open("medium.txt", O_RDWR | O_CREAT, 0666);
1046 ATF_REQUIRE(fd >= 0);
1047 close(fd);
1055 fd = open("medium.txt", O_RDONLY);
1056 ATF_REQUIRE(fd >= 0);
1057 r = read(fd, buffer, sizeof(buffer));
1059 close(fd);
1068 int fd; variable
1079 fd = open("unix.txt", O_RDWR | O_CREAT, 0666);
1080 ATF_REQUIRE(fd >= 0);
1081 close(fd);
1089 fd = open("unix.txt", O_RDONLY);
1090 ATF_REQUIRE(fd >= 0);
1091 r = read(fd, buffer, sizeof(buffer));
1093 close(fd);
1112 int fd; variable
1118 fd = open("small.txt", O_RDWR | O_CREAT, 0666);
1119 ATF_REQUIRE(fd >= 0);
1120 close(fd);
1128 fd = open("small.txt", O_RDONLY);
1129 ATF_REQUIRE(fd >= 0);
1130 r = read(fd, buffer, sizeof(buffer));
1132 close(fd);
1141 int fd; variable
1145 fd = open("small.txt", O_RDWR | O_CREAT, 0666);
1146 ATF_REQUIRE(fd >= 0);
1147 write_all(fd, contents, strlen(contents) + 1);
1148 close(fd);
1164 int fd; variable
1176 fd = open("rfc7440.txt", O_RDWR | O_CREAT, 0666);
1177 ATF_REQUIRE(fd >= 0);
1178 close(fd);
1216 fd = open("rfc7440.txt", O_RDONLY);
1217 ATF_REQUIRE(fd >= 0);
1218 r = read(fd, buffer, sizeof(buffer));
1220 close(fd);