Lines Matching full:fd

50 seek_expect(int fd, off_t offset, int whence, off_t expect_offset)  in seek_expect()  argument
53 off_t seek_offset = lseek(fd, offset, whence); in seek_expect()
58 fprintf(stderr, "lseek(fd, %ld, SEEK_%s) = %ld (expected %ld)", in seek_expect()
69 seek_data(int fd, off_t offset, off_t expected) in seek_data() argument
71 seek_expect(fd, offset, SEEK_DATA, expected); in seek_data()
75 seek_hole(int fd, off_t offset, off_t expected) in seek_hole() argument
77 seek_expect(fd, offset, SEEK_HOLE, expected); in seek_hole()
94 int fd = open(file_path, O_RDWR | O_CREAT, 0666); in main() local
95 if (fd == -1) { in main()
110 err = ftruncate(fd, file_size); in main()
117 MAP_SHARED, fd, 0)) == MAP_FAILED) { in main()
123 seek_data(fd, 0, -1); in main()
126 seek_hole(fd, 0, 0); in main()
129 seek_data(fd, 2 * file_size, -1); in main()
130 seek_hole(fd, 2 * file_size, -1); in main()
134 seek_data(fd, 0, 0); in main()
135 seek_data(fd, block_size, -1); in main()
136 seek_hole(fd, 0, block_size); in main()
137 seek_hole(fd, block_size, block_size); in main()
141 seek_data(fd, 0, 0); in main()
142 seek_data(fd, block_size, block_size); in main()
143 seek_hole(fd, 0, P2ROUNDUP(file_size / 2, block_size)); in main()
144 seek_hole(fd, block_size, P2ROUNDUP(file_size / 2, block_size)); in main()
148 seek_data(fd, 0, 0); in main()
149 seek_data(fd, file_size * 3 / 4, in main()
151 seek_hole(fd, 0, file_size); in main()
152 seek_hole(fd, file_size / 2, file_size); in main()
156 seek_data(fd, 0, 0); in main()
157 seek_data(fd, block_size, 2 * block_size); in main()
158 seek_hole(fd, 0, block_size); in main()
159 seek_hole(fd, block_size, block_size); in main()
160 seek_hole(fd, 2 * block_size, file_size); in main()
168 close(fd); in main()