Whamcloud - gitweb
LU-14160 tests: fix fsx logdump to fit in 80 chars 10/44510/3
authorAndreas Dilger <adilger@whamcloud.com>
Thu, 5 Aug 2021 20:45:46 +0000 (14:45 -0600)
committerOleg Drokin <green@whamcloud.com>
Wed, 25 Aug 2021 06:23:05 +0000 (06:23 +0000)
Fix fsx logdump fallocate/truncate lines to fit within 80 columns.
Remove spurious leading 0 for every operation length.

Test-Parameters: trivial testlist=sanityn env=ONLY=16
Fixes: cb037f305c64 ("LU-14160 fallocate: Add punch mode to fallocate")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I93460b62be8611926e620241232d886dee3ebbe5
Reviewed-on: https://review.whamcloud.com/44510
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
Reviewed-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/fsx.c

index 0d1b1d4..a013969 100644 (file)
@@ -359,15 +359,15 @@ logdump(void)
                        break;
                case OP_TRUNCATE:
                        down = lp->args[0] < lp->args[1];
-                       prt("TRUNCATE %s\tfrom 0x%05x to 0x%05x",
-                           down ? "DOWN" : "UP", lp->args[1], lp->args[0]);
+                       prt("TRUNC%s 0x%05x to 0x%05x",
+                           down ? "_DN" : "_UP", lp->args[1], lp->args[0]);
                        if (badoff >= lp->args[!down] &&
                            badoff < lp->args[!!down])
-                               prt("\t******WWWW");
+                               prt("\t******TTTT");
                        break;
                case OP_FALLOCATE:
                        /* 0: offset 1: length 2: where alloced */
-                       prt("FALLOC  \tfrom 0x%05x to 0x%05x\t(0x%05x bytes)%s",
+                       prt("FALLOC   0x%05x thru 0x%05x\t(0x%05x bytes)%s",
                            lp->args[0], lp->args[0] + lp->args[1],
                            lp->args[1], falloc_type[lp->args[2]]);
                        if (badoff >= lp->args[0] &&
@@ -690,7 +690,7 @@ output_line(struct test_file *tf, int op, unsigned int offset,
            (monitorend == -1 || offset <= monitorend)))))))
                return;
 
-       prt("%06lu%s %lu.%06u %-10s %#08x %s %#08x\t(0x0%x bytes)\n",
+       prt("%06lu%s %lu.%06u %-10s %#08x %s %#08x\t(0x%x bytes)\n",
            testcalls, fill_tf_buf(tf), tv.tv_sec, (int)tv.tv_usec,
            ops[op], offset, op == OP_TRUNCATE || op == OP_PUNCH_HOLE ?
            " to " : "thru", offset + size - 1,