From: Eryu Guan Date: Mon, 9 May 2016 06:03:27 +0000 (+1000) Subject: fstests: fix various $seqres.full issues X-Git-Tag: v2022.05.01~2516 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=598600ce04e1b53a509e3e1ae2e1319b90a8cc57;p=xfstests-dev.git fstests: fix various $seqres.full issues There're many tests don't remove $seqres.full before writing to it, and accumulating logs there, then the logs are always growing over time. Let's fix them once. generic/16[1-8] generic/170 and generic/33[34] truncate $seqres.full in the middle of the test, which results in partial logs. Fix them as well. xfs/227 has duplicated lines to remove $seqres.full, remove the extra line. Signed-off-by: Eryu Guan Reviewed-by: Darrick J. Wong Signed-off-by: Dave Chinner --- diff --git a/tests/ext4/301 b/tests/ext4/301 index 8e051f99..2606c33f 100755 --- a/tests/ext4/301 +++ b/tests/ext4/301 @@ -108,6 +108,7 @@ _workout() _require_fio $fio_config +rm -f $seqres.full _scratch_mkfs >> $seqres.full 2>&1 _scratch_mount diff --git a/tests/ext4/302 b/tests/ext4/302 index e45dfb81..d6506f69 100755 --- a/tests/ext4/302 +++ b/tests/ext4/302 @@ -126,6 +126,7 @@ _workout() _require_fio $fio_config +rm -f $seqres.full _scratch_mkfs >> $seqres.full 2>&1 _scratch_mount diff --git a/tests/ext4/303 b/tests/ext4/303 index 3519002d..ac75a392 100755 --- a/tests/ext4/303 +++ b/tests/ext4/303 @@ -136,6 +136,7 @@ _workout() _require_fio $fio_config +rm -f $seqres.full _scratch_mkfs >> $seqres.full 2>&1 _scratch_mount diff --git a/tests/ext4/304 b/tests/ext4/304 index 952bbb92..5287ab5d 100755 --- a/tests/ext4/304 +++ b/tests/ext4/304 @@ -113,6 +113,7 @@ _workout() _require_fio $fio_config +rm -f $seqres.full _scratch_mkfs >> $seqres.full 2>&1 _scratch_mount diff --git a/tests/ext4/307 b/tests/ext4/307 index 505737d9..4bca056a 100755 --- a/tests/ext4/307 +++ b/tests/ext4/307 @@ -65,6 +65,7 @@ _require_scratch _require_defrag _require_xfs_io_command "falloc" +rm -f $seqres.full _scratch_mkfs_sized $((512 * 1024 * 1024)) >> $seqres.full 2>&1 _scratch_mount diff --git a/tests/generic/161 b/tests/generic/161 index c62e0fb0..ba7108e5 100755 --- a/tests/generic/161 +++ b/tests/generic/161 @@ -58,7 +58,7 @@ loops=4096 blksz=65536 echo "Initialize files" -echo > $seqres.full +echo >> $seqres.full _pwrite_byte 0x61 0 $((loops * blksz)) $testdir/file1 >> $seqres.full _cp_reflink $testdir/file1 $testdir/file2 _scratch_cycle_mount diff --git a/tests/generic/162 b/tests/generic/162 index c42c25a5..5ff2ee2c 100755 --- a/tests/generic/162 +++ b/tests/generic/162 @@ -58,7 +58,7 @@ nr_loops=$((loops - 1)) blksz=65536 echo "Initialize files" -echo > $seqres.full +echo >> $seqres.full _pwrite_byte 0x61 0 $((loops * blksz)) $testdir/file1 >> $seqres.full _pwrite_byte 0x61 0 $((loops * blksz)) $testdir/file2 >> $seqres.full _scratch_cycle_mount diff --git a/tests/generic/163 b/tests/generic/163 index 4e916c6f..fcba677c 100755 --- a/tests/generic/163 +++ b/tests/generic/163 @@ -58,7 +58,7 @@ nr_loops=$((loops - 1)) blksz=65536 echo "Initialize files" -echo > $seqres.full +echo >> $seqres.full _pwrite_byte 0x61 0 $((loops * blksz)) $testdir/file1 >> $seqres.full _pwrite_byte 0x61 0 $((loops * blksz)) $testdir/file2 >> $seqres.full _scratch_cycle_mount diff --git a/tests/generic/164 b/tests/generic/164 index e2ef55fc..acacb7f4 100755 --- a/tests/generic/164 +++ b/tests/generic/164 @@ -60,7 +60,7 @@ nr_loops=$((loops - 1)) blksz=65536 echo "Initialize files" -echo > $seqres.full +echo >> $seqres.full _pwrite_byte 0x61 0 $((loops * blksz)) $testdir/file1 >> $seqres.full _pwrite_byte 0x62 0 $((loops * blksz)) $testdir/file2 >> $seqres.full _cp_reflink $testdir/file1 $testdir/file3 diff --git a/tests/generic/165 b/tests/generic/165 index fc2ac1bf..b742d196 100755 --- a/tests/generic/165 +++ b/tests/generic/165 @@ -61,7 +61,7 @@ nr_loops=$((loops - 1)) blksz=65536 echo "Initialize files" -echo > $seqres.full +echo >> $seqres.full _pwrite_byte 0x61 0 $((loops * blksz)) $testdir/file1 >> $seqres.full _pwrite_byte 0x62 0 $((loops * blksz)) $testdir/file2 >> $seqres.full _cp_reflink $testdir/file1 $testdir/file3 diff --git a/tests/generic/166 b/tests/generic/166 index 831b5981..0e31f2eb 100755 --- a/tests/generic/166 +++ b/tests/generic/166 @@ -61,7 +61,7 @@ nr_loops=$((loops - 1)) blksz=65536 echo "Initialize file" -echo > $seqres.full +echo >> $seqres.full _pwrite_byte 0x61 0 $((loops * blksz)) $testdir/file1 >> $seqres.full _scratch_cycle_mount diff --git a/tests/generic/167 b/tests/generic/167 index 355a2bf1..b2d6c87b 100755 --- a/tests/generic/167 +++ b/tests/generic/167 @@ -60,7 +60,7 @@ nr_loops=$((loops - 1)) blksz=65536 echo "Initialize file" -echo > $seqres.full +echo >> $seqres.full _pwrite_byte 0x61 0 $((loops * blksz)) $testdir/file1 >> $seqres.full _scratch_cycle_mount diff --git a/tests/generic/168 b/tests/generic/168 index 98e6f304..7047d10a 100755 --- a/tests/generic/168 +++ b/tests/generic/168 @@ -59,7 +59,7 @@ nr_loops=$((loops - 1)) blksz=65536 echo "Initialize files" -echo > $seqres.full +echo >> $seqres.full _pwrite_byte 0x61 0 $((loops * blksz)) $testdir/file1 >> $seqres.full _pwrite_byte 0x62 0 $((loops * blksz)) $testdir/file2 >> $seqres.full _scratch_cycle_mount diff --git a/tests/generic/170 b/tests/generic/170 index 4f34f3b8..4861052e 100755 --- a/tests/generic/170 +++ b/tests/generic/170 @@ -60,7 +60,7 @@ nr_loops=$((loops - 1)) blksz=65536 echo "Initialize files" -echo > $seqres.full +echo >> $seqres.full _pwrite_byte 0x61 0 $((loops * blksz)) $testdir/file1 >> $seqres.full _pwrite_byte 0x62 0 $((loops * blksz)) $testdir/file2 >> $seqres.full _scratch_cycle_mount diff --git a/tests/generic/231 b/tests/generic/231 index 3133cfe9..f0636711 100755 --- a/tests/generic/231 +++ b/tests/generic/231 @@ -70,6 +70,7 @@ _require_scratch _require_quota _require_user +rm -f $seqres.full _scratch_mkfs >> $seqres.full 2>&1 _scratch_mount "-o usrquota,grpquota" chmod 777 $SCRATCH_MNT diff --git a/tests/generic/333 b/tests/generic/333 index 61a2d02a..8db86e3c 100755 --- a/tests/generic/333 +++ b/tests/generic/333 @@ -61,7 +61,7 @@ nr_loops=$((loops - 1)) blksz=65536 echo "Initialize file" -echo > $seqres.full +echo >> $seqres.full _pwrite_byte 0x61 0 $((loops * blksz)) $testdir/file1 >> $seqres.full _scratch_cycle_mount diff --git a/tests/generic/334 b/tests/generic/334 index 28c47d6d..57141252 100755 --- a/tests/generic/334 +++ b/tests/generic/334 @@ -60,7 +60,7 @@ nr_loops=$((loops - 1)) blksz=65536 echo "Initialize file" -echo > $seqres.full +echo >> $seqres.full _pwrite_byte 0x61 0 $((loops * blksz)) $testdir/file1 >> $seqres.full _scratch_cycle_mount diff --git a/tests/xfs/104 b/tests/xfs/104 index b78ac49d..17f9b629 100755 --- a/tests/xfs/104 +++ b/tests/xfs/104 @@ -71,6 +71,8 @@ _stress_scratch() # real QA test starts here _supported_fs xfs _require_scratch + +rm -f $seqres.full _scratch_mkfs_xfs | tee -a $seqres.full | _filter_mkfs 2>$tmp.mkfs . $tmp.mkfs # extract blocksize and data size for scratch device diff --git a/tests/xfs/109 b/tests/xfs/109 index 4d5450ec..ac206198 100755 --- a/tests/xfs/109 +++ b/tests/xfs/109 @@ -93,6 +93,7 @@ allocate() # real QA test starts here _scratch_unmount 2>/dev/null _scratch_mount +rm -f $seqres.full # see if faststart is possible (and requested) files=2000 diff --git a/tests/xfs/122 b/tests/xfs/122 index dc28c56a..845cdd2b 100755 --- a/tests/xfs/122 +++ b/tests/xfs/122 @@ -41,6 +41,8 @@ _supported_fs xfs _supported_os Linux _require_command "$INDENT_PROG" indent +rm -f $seqres.full + # filter out known changes to xfs type sizes _type_size_filter() { diff --git a/tests/xfs/164 b/tests/xfs/164 index 404c2080..64133240 100755 --- a/tests/xfs/164 +++ b/tests/xfs/164 @@ -70,6 +70,7 @@ _supported_os IRIX Linux _require_test testfile=$TEST_DIR/file.$seq +rm -f $seqres.full _test_eof_hole() { diff --git a/tests/xfs/227 b/tests/xfs/227 index 64e8f147..817c9681 100755 --- a/tests/xfs/227 +++ b/tests/xfs/227 @@ -153,8 +153,6 @@ create_target_attr_last() create_attrs $nattrs $target } -rm -f $seqres.full - # use a small filesystem so we can control freespace easily _scratch_mkfs_sized $((50 * 1024 * 1024)) >> $seqres.full 2>&1 _scratch_mount diff --git a/tests/xfs/244 b/tests/xfs/244 index 257d121a..a84d87a2 100755 --- a/tests/xfs/244 +++ b/tests/xfs/244 @@ -52,6 +52,7 @@ _require_projid16bit export MOUNT_OPTIONS="-opquota" +rm -f $seqres.full # make fs with no projid32bit _scratch_mkfs_xfs -i projid32bit=0 >> $seqres.full || _fail "mkfs failed" _qmount diff --git a/tests/xfs/261 b/tests/xfs/261 index 950c5391..e3c25919 100755 --- a/tests/xfs/261 +++ b/tests/xfs/261 @@ -51,6 +51,7 @@ _cleanup() . ./common/quota echo "Silence is golden." +rm -f $seqres.full # real QA test starts here diff --git a/tests/xfs/278 b/tests/xfs/278 index 2b1db8a2..caf2622b 100755 --- a/tests/xfs/278 +++ b/tests/xfs/278 @@ -47,7 +47,8 @@ _supported_fs xfs _supported_os Linux _require_scratch -_scratch_mkfs >/dev/null 2>&1 +rm -f $seqres.full +_scratch_mkfs >$seqres.full 2>&1 _scratch_mount mkdir -p $SCRATCH_MNT/dir/subdir diff --git a/tests/xfs/304 b/tests/xfs/304 index 0f902fc5..495356da 100755 --- a/tests/xfs/304 +++ b/tests/xfs/304 @@ -51,6 +51,7 @@ _require_xfs_quota _require_xfs_mkfs_crc _require_xfs_crc +rm -f $seqres.full _scratch_mkfs_xfs -m crc=1 >/dev/null 2>&1 _qmount_option "uquota,gquota,pquota" diff --git a/tests/xfs/305 b/tests/xfs/305 index d925b8b9..15fb1ad5 100755 --- a/tests/xfs/305 +++ b/tests/xfs/305 @@ -51,6 +51,7 @@ _require_xfs_quota _require_xfs_mkfs_crc _require_xfs_crc +rm -f $seqres.full _scratch_mkfs_xfs -m crc=1 >/dev/null 2>&1 _qmount_option "uquota,gquota,pquota"