Lines Matching refs:tf
422 struct test_file *tf = get_tf();
423 return tf->fd;
428 struct test_file *tf;
441 for (i = 0, tf = test_files; i < num_test_files; i++, tf++) {
443 tf->path = argv[i];
444 tf->fd = open(tf->path, O_RDWR | (lite ? 0 : O_CREAT | O_TRUNC),
446 if (tf->fd < 0) {
447 prterr(tf->path);
455 for (i = 0, tf = test_files; i < num_test_files; i++, tf++)
456 prt("fd %d: %s\n", i, tf->path);
462 struct test_file *tf;
464 for (i = 0, tf = test_files; i < num_test_files; i++, tf++) {
465 if (close(tf->fd)) {
542 char *fill_tf_buf(struct test_file *tf)
547 sprintf(tf_buf, "%lu ", (unsigned long)(tf - test_files));
552 output_line(struct test_file *tf, int op, unsigned offset,
575 tf_num = fill_tf_buf(tf);
589 struct test_file *tf = get_tf();
590 int fd = tf->fd;
612 output_line(tf, OP_READ, offset, size, &t);
644 struct test_file *tf = get_tf();
645 int fd = tf->fd;
667 output_line(tf, OP_MAPREAD, offset, size, &t);
722 struct test_file *tf = get_tf();
723 int fd = tf->fd;
750 output_line(tf, OP_WRITE, offset, size, &t);
782 struct test_file *tf = get_tf();
783 int fd = tf->fd;
811 output_line(tf, OP_MAPWRITE, offset, size, &t);
880 struct test_file *tf = get_tf();
881 int fd = tf->fd;
900 output_line(tf, OP_TRUNCATE, oldsize, size, &t);
941 struct test_file *tf = get_tf();
952 if (close(tf->fd)) {
960 tf->fd = open(tf->path, O_RDWR, 0);
961 if (tf->fd < 0) {