]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
fstests: fix various $seqres.full issues
authorEryu Guan <eguan@redhat.com>
Mon, 9 May 2016 06:03:27 +0000 (16:03 +1000)
committerDave Chinner <david@fromorbit.com>
Mon, 9 May 2016 06:03:27 +0000 (16:03 +1000)
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 <eguan@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
27 files changed:
tests/ext4/301
tests/ext4/302
tests/ext4/303
tests/ext4/304
tests/ext4/307
tests/generic/161
tests/generic/162
tests/generic/163
tests/generic/164
tests/generic/165
tests/generic/166
tests/generic/167
tests/generic/168
tests/generic/170
tests/generic/231
tests/generic/333
tests/generic/334
tests/xfs/104
tests/xfs/109
tests/xfs/122
tests/xfs/164
tests/xfs/227
tests/xfs/244
tests/xfs/261
tests/xfs/278
tests/xfs/304
tests/xfs/305

index 8e051f99d7170230bd0fc96470c459e071eb5d39..2606c33fffa5447af6b966fefd72d6c11f3ff35b 100755 (executable)
@@ -108,6 +108,7 @@ _workout()
 
 _require_fio $fio_config
 
+rm -f $seqres.full
 _scratch_mkfs  >> $seqres.full 2>&1
 _scratch_mount
 
index e45dfb8180d8379b4a4c7f91a504225b041b5532..d6506f691ded74ef3755859124a6a4e368fdc54d 100755 (executable)
@@ -126,6 +126,7 @@ _workout()
 
 _require_fio $fio_config
 
+rm -f $seqres.full
 _scratch_mkfs  >> $seqres.full 2>&1
 _scratch_mount
 
index 3519002d67a27f6e8ae84a53e1bec25136b36d76..ac75a392c50ccab706550baa5eb8393ed86c2eeb 100755 (executable)
@@ -136,6 +136,7 @@ _workout()
 
 _require_fio $fio_config
 
+rm -f $seqres.full
 _scratch_mkfs  >> $seqres.full 2>&1
 _scratch_mount
 
index 952bbb92675990b987f535d5c2228f93aedd5200..5287ab5d1ed5fcfb8b0f7a326d67d8c202e40699 100755 (executable)
@@ -113,6 +113,7 @@ _workout()
 
 _require_fio $fio_config
 
+rm -f $seqres.full
 _scratch_mkfs  >> $seqres.full 2>&1
 _scratch_mount
 
index 505737d9621e37facb0fe2b08d43aa1b57fae82c..4bca056a3a609f6e2f7f5e89aae23943f76cbecf 100755 (executable)
@@ -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
 
index c62e0fb0c2ea27ef5c53077cdd6ae6df8d62f8f1..ba7108e5d209a3de37ad81a959d869abe7526531 100755 (executable)
@@ -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
index c42c25a56dcec001003ae18d11f4aed80d7a3217..5ff2ee2c12dad71bb9d1e477428d80fdcf3f0ef0 100755 (executable)
@@ -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
index 4e916c6f6b0c14b8a1ad4ab9846ca6bc81d7b174..fcba677c64c5c67328be57dd87b33af70b0a2495 100755 (executable)
@@ -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
index e2ef55fc7359c05feba07c592575430089e9f0f9..acacb7f4b17030729a77fe98c1d581179712205a 100755 (executable)
@@ -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
index fc2ac1bfabf62242488d583d89d12acd23855fc0..b742d19619e16cb021b2e22ff0b99ec1d33e6723 100755 (executable)
@@ -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
index 831b598177f2d28ab8dbe23124e8138807f5e3de..0e31f2eb9c7994eb0e45cc051ccfea4e13ed4013 100755 (executable)
@@ -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
 
index 355a2bf1c6aa9708630aed78f430fe01352fd9e8..b2d6c87b7fc5eea89ee328b4d57c80c91d31f986 100755 (executable)
@@ -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
 
index 98e6f30412edbdbd0e030cf74519693c411f438c..7047d10a0035102b778b68393ac43cd29ffb321a 100755 (executable)
@@ -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
index 4f34f3b8c662808c0ed359558379b742cfb0adad..4861052e48f906a2251d2c333f48a4225263b260 100755 (executable)
@@ -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
index 3133cfe9ab1d60024d95d0be80c486e153e54fef..f06367117ed1299f5a3b76435a20c1f1f6a4e25c 100755 (executable)
@@ -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
index 61a2d02a1bedc11a32e64d765382bbc185e85a50..8db86e3c14d80d38e16a4783ff7e9488ee774646 100755 (executable)
@@ -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
 
index 28c47d6dfa4db3011debe4078b2990f85130cccd..57141252d9458f64c7fbf6d1f1d1e654c9156a7e 100755 (executable)
@@ -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
 
index b78ac49d47fdbf2e5177d1ff3110fd450c952b86..17f9b629ea793ed73d4fc149e8d25ff1f6ebd252 100755 (executable)
@@ -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
 
index 4d5450ecb134283050e869355c875812e83e2235..ac2061983e2b4c2ee07ec1c41d7fcfc62bc47eb4 100755 (executable)
@@ -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
index dc28c56a9477a6e816b6d38747d7f5be491a2778..845cdd2bdd6216f4730d5de5025a9355b9742dd7 100755 (executable)
@@ -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()
 {
index 404c2080ac71ee7d5a04f90f8537faa8a8689311..64133240bf3db4f6fb5aa6e4c0e914da09b0ca6f 100755 (executable)
@@ -70,6 +70,7 @@ _supported_os IRIX Linux
 _require_test
 
 testfile=$TEST_DIR/file.$seq
+rm -f $seqres.full
 
 _test_eof_hole()
 {
index 64e8f1478891992ed605e9a23cbb1214ab83b777..817c96817ccf62ba95cfa043280b67724d76b2ab 100755 (executable)
@@ -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
index 257d121afea82569eb9b84861ebe0db10ddbe229..a84d87a23f71555852856034486f9ca0236a42e1 100755 (executable)
@@ -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
index 950c5391849d220225de4ade4f269975f1407f26..e3c259192de11b24d765a9d99c4275ad1f1381af 100755 (executable)
@@ -51,6 +51,7 @@ _cleanup()
 . ./common/quota
 
 echo "Silence is golden."
+rm -f $seqres.full
 
 # real QA test starts here
 
index 2b1db8a2fe69e02b5c31cd4d3c2b210aa001f60e..caf2622b76cd10f2f1585770184048967e7f0653 100755 (executable)
@@ -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
index 0f902fc5e9a3404f0353f9e352676d5a1775b24f..495356da67a2fc5c892ff0d1fb7a426cd1720dc3 100755 (executable)
@@ -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"
index d925b8b9317908691fe2d90616ba6abf4bbe9491..15fb1ad5ced07cd0ac8e79b1da3cee2fe0c5b868 100755 (executable)
@@ -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"