/external/ltp/testcases/kernel/io/direct_io/ |
D | diotest2.c | 81 int runtest(int fd_r, int fd_w, int iter, off64_t offset, int action) in runtest() argument 109 if (lseek(fd_r, offset + iter * bufsize, SEEK_SET) < 0) { in runtest() 114 if (read(fd_r, buf2, bufsize) < bufsize) { in runtest() 140 int i, action, fd_r, fd_w; in main() local 185 if ((fd_r = open(filename, O_DIRECT | O_RDONLY, 0666)) < 0) in main() 188 if (runtest(fd_r, fd_w, iter, offset, action) < 0) { in main() 195 close(fd_r); in main() 204 if ((fd_r = open(filename, O_RDONLY | O_CREAT, 0666)) == -1) in main() 207 if (runtest(fd_r, fd_w, iter, offset, action) < 0) { in main() 214 close(fd_r); in main() [all …]
|
D | diotest3.c | 91 int runtest(int fd_r, int fd_w, int childnum, int action) in runtest() argument 127 if (lseek(fd_r, seekoff, SEEK_SET) < 0) { in runtest() 131 if (read(fd_r, buf2, bufsize) < bufsize) { in runtest() 150 int fd_w, fd_r; in child_function() local 160 if ((fd_r = open(filename, O_DIRECT | O_RDONLY, 0666)) < 0) { in child_function() 167 if (runtest(fd_r, fd_w, childnum, action) == -1) { in child_function() 171 close(fd_r); in child_function() 182 if ((fd_r = open(filename, O_RDONLY, 0666)) < 0) { in child_function() 188 if (runtest(fd_r, fd_w, childnum, action) == -1) { in child_function() 192 close(fd_r); in child_function() [all …]
|
D | diotest5.c | 85 int runtest(int fd_r, int fd_w, int iter, off64_t offset, int action) in runtest() argument 131 if (lseek(fd_r, offset, SEEK_SET) < 0) { in runtest() 136 if (readv(fd_r, iov2, nvector) < 0) { in runtest() 170 int i, action, fd_r, fd_w; in main() local 221 if ((fd_r = open64(filename, O_DIRECT | O_RDONLY | O_CREAT, 0666)) < 0) { in main() 225 if (runtest(fd_r, fd_w, iter, offset, action) < 0) { in main() 233 close(fd_r); in main() 243 if ((fd_r = open64(filename, O_RDONLY | O_CREAT, 0666)) < 0) { in main() 247 if (runtest(fd_r, fd_w, iter, offset, action) < 0) { in main() 254 close(fd_r); in main() [all …]
|
D | diotest6.c | 85 int runtest(int fd_r, int fd_w, int childnum, int action) in runtest() argument 143 if (lseek(fd_r, seekoff, SEEK_SET) < 0) { in runtest() 148 n = readv(fd_r, iov_r, nvector); in runtest() 176 int fd_w, fd_r; in child_function() local 185 if ((fd_r = open(filename, O_DIRECT | O_RDONLY, 0666)) < 0) { in child_function() 192 if (runtest(fd_r, fd_w, childnum, action) == -1) { in child_function() 196 close(fd_r); in child_function() 207 if ((fd_r = open(filename, O_RDONLY, 0666)) < 0) { in child_function() 214 if (runtest(fd_r, fd_w, childnum, action) == -1) { in child_function() 218 close(fd_r); in child_function() [all …]
|