Lines Matching refs:tf
425 struct test_file *tf = get_tf();
426 return tf->fd;
431 struct test_file *tf;
444 for (i = 0, tf = test_files; i < num_test_files; i++, tf++) {
446 tf->path = argv[i];
447 tf->fd = open(tf->path, O_RDWR | (lite ? 0 : O_CREAT | O_TRUNC),
449 if (tf->fd < 0) {
450 prterr(tf->path);
458 for (i = 0, tf = test_files; i < num_test_files; i++, tf++)
459 prt("fd %d: %s\n", i, tf->path);
465 struct test_file *tf;
467 for (i = 0, tf = test_files; i < num_test_files; i++, tf++) {
468 if (close(tf->fd)) {
545 char *fill_tf_buf(struct test_file *tf)
550 sprintf(tf_buf, "%lu ", (unsigned long)(tf - test_files));
555 output_line(struct test_file *tf, int op, unsigned offset,
578 tf_num = fill_tf_buf(tf);
592 struct test_file *tf = get_tf();
593 int fd = tf->fd;
615 output_line(tf, OP_READ, offset, size, &t);
647 struct test_file *tf = get_tf();
648 int fd = tf->fd;
670 output_line(tf, OP_MAPREAD, offset, size, &t);
725 struct test_file *tf = get_tf();
726 int fd = tf->fd;
753 output_line(tf, OP_WRITE, offset, size, &t);
785 struct test_file *tf = get_tf();
786 int fd = tf->fd;
814 output_line(tf, OP_MAPWRITE, offset, size, &t);
883 struct test_file *tf = get_tf();
884 int fd = tf->fd;
903 output_line(tf, OP_TRUNCATE, oldsize, size, &t);
944 struct test_file *tf = get_tf();
955 if (close(tf->fd)) {
963 tf->fd = open(tf->path, O_RDWR, 0);
964 if (tf->fd < 0) {