Skip to contentSkip to conversation

generic/474: shift target directory to a sub-dir of SCRATCH_MNT

PATCH New Zorro Lang 1 participant 2 messages Jan 2, 2019

lore
Share & tools
lore

Zorro Lang

author
#0 lore raw

PATCH 1/2 generic/474: shift target directory to a sub-dir of SCRATCH_MNT

If testing on large fs, 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.

---

Hi,

These 2 patches try to fix case issues which cause testing hang on(not real hang) large-fs.

Thanks,
Zorro

 tests/generic/474 | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
tests/generic/474 +8 -4
index 12157a39..5ce72d75 100755
@@ -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
Signature · 1 line
2.17.2
author
#1 lore raw

PATCH 2/2 xfs/139-140: skip testing on large scratch dev

x/139 and x/140 makes XFS with very small agsize. That agsize is too small for a large fs. And it's not necessary to test on large fs, so skip it directly if scratch dev is large dev.

---
 tests/xfs/139 | 3 +++
 tests/xfs/140 | 3 +++
 2 files changed, 6 insertions(+)
tests/xfs/139 +3 -0
index 3a20ce50..4c498ff2 100755
@@ -29,6 +29,9 @@ _cleanup()
 
 # real QA test starts here
 _supported_os Linux
+# Below agsize (16384 * $blksz) is too small for a large fs, and it's not
+# necessary to test on large fs
+_require_no_large_scratch_dev
 _require_scratch_reflink
 _require_cp_reflink
 
tests/xfs/140 +3 -0
index 7385dc42..863b1e6f 100755
@@ -29,6 +29,9 @@ _cleanup()
 
 # real QA test starts here
 _supported_os Linux
+# Below agsize is too small for a large fs, and it's not necessary to test on
+# large fs
+_require_no_large_scratch_dev
 _require_scratch_reflink
 _require_cp_reflink
 
Signature · 1 line
2.17.2