]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
generic/474: shift target directory to a sub-dir of SCRATCH_MNT
authorZorro Lang <zlang@redhat.com>
Wed, 2 Jan 2019 04:03:18 +0000 (12:03 +0800)
committerEryu Guan <guaneryu@gmail.com>
Sun, 6 Jan 2019 14:02:53 +0000 (22:02 +0800)
If testing on large fs (--large-fs option), there's a huge size
.use_space file in $SCRATCH_MNT, then `fssum $SCRATCH_MNT` trys to
read whole huge file. That's wasting time, so change the target path
to a sub-dir of $SCRATCH_MNT.

Signed-off-by: Zorro Lang <zlang@redhat.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/generic/474

index 12157a3961b82314c5bfa4ccb4ba59b49dcc7712..5ce72d75d50dff5b044126e34240f0f00dcc716b 100755 (executable)
@@ -55,14 +55,18 @@ _scratch_mount
 
 sync
 
-$XFS_IO_PROG -f -c "pwrite 0 4K" $SCRATCH_MNT/testfile >/dev/null 2>&1
+# Large fs has a huge size .use_space file, will take long time on running
+# fssum $SCRATCH_MNT. So change the target path to a sub-dir of $SCRATCH_MNT.
+localdir=$SCRATCH_MNT/dir
+mkdir $localdir
+$XFS_IO_PROG -f -c "pwrite 0 4K" $localdir/testfile >/dev/null 2>&1
 
 # fssum used for comparing checksum of test file(data & metedata),
 # exclude checking about atime, block structure, open error.
-$FSSUM_PROG -ugomAcdES -f -w $tmp.fssum $SCRATCH_MNT
-$XFS_IO_PROG -c "syncfs" $SCRATCH_MNT/testfile >/dev/null 2>&1
+$FSSUM_PROG -ugomAcdES -f -w $tmp.fssum $localdir
+$XFS_IO_PROG -c "syncfs" $localdir/testfile >/dev/null 2>&1
 _scratch_shutdown
 _scratch_cycle_mount
-$FSSUM_PROG -r $tmp.fssum $SCRATCH_MNT
+$FSSUM_PROG -r $tmp.fssum $localdir
 
 exit