]> www.infradead.org Git - users/hch/xfstests-dev.git/commitdiff
fstests: capture some failures to seqres.full
authorDave Chinner <dchinner@redhat.com>
Tue, 26 Nov 2024 23:50:54 +0000 (10:50 +1100)
committerZorro Lang <zlang@kernel.org>
Sun, 8 Dec 2024 14:18:09 +0000 (22:18 +0800)
Whilst trying to debug test failures, I found a few places where
errors needed to be redirected to $seqres.full rather than
/dev/null. This is a collection of all the conversions that haven't
been captured by some other bug fix patch.

Note that calling _check_filesystems() after removing the
require_test/scratch files means it is a no-op, so I removed that
call at the same time as capturing unmount failures after the test
has failed.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Zorro lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
check
tests/generic/049
tests/generic/603
tests/xfs/495

diff --git a/check b/check
index 9222cd7e4f8197be0db4d3d161caa589bc82d651..8131f4e2ee1614f567bd9c841e0748aaeb7c303b 100755 (executable)
--- a/check
+++ b/check
@@ -1004,14 +1004,13 @@ function run_section()
 
                if [ $sts -ne 0 ]; then
                        _dump_err_cont "[failed, exit status $sts]"
-                       _test_unmount 2> /dev/null
-                       _scratch_unmount 2> /dev/null
+                       _test_unmount 2>> $seqres.full
+                       _scratch_unmount 2>> $seqres.full
                        rm -f ${RESULT_DIR}/require_test*
                        rm -f ${RESULT_DIR}/require_scratch*
                        # Even though we failed, there may be something interesting in
                        # dmesg which can help debugging.
                        _check_dmesg
-                       (_adjust_oom_score 250; _check_filesystems)
                        tc_status="fail"
                else
                        # The test apparently passed, so check for corruption
index 94b5afe9686e359a3e90111ae42b8f8aa4bab5ca..fcfbd48ec557df5b65160ab239b7d357998ff021 100755 (executable)
@@ -56,7 +56,7 @@ i=1;
 while [ $i -lt 1000 ]
 do
        file=$SCRATCH_MNT/$i
-       $XFS_IO_PROG -f -c "pwrite -b 32k -S 0xff 0 32k" $file > /dev/null
+       $XFS_IO_PROG -f -c "pwrite -b 32k -S 0xff 0 32k" $file >> $seqres.full
        if [ $? -ne 0 ]
        then
                echo error creating/writing file $file
index a84695831ef762311fe3097ebd7231f2d888c796..2a75cf9e022750fa76d665dce80f27b8a69ea230 100755 (executable)
@@ -77,7 +77,7 @@ test_grace()
                _filter_xfs_io_error | tee -a $seqres.full
        repquota -v -$type $SCRATCH_MNT | grep -v "^root" >>$seqres.full 2>&1
        # Reset grace time here, make below grace time test more accurate
-       setquota -$type $qa_user -T $bgrace $igrace $SCRATCH_MNT 2>/dev/null
+       setquota -$type $qa_user -T $bgrace $igrace $SCRATCH_MNT >>$seqres.full 2>&1
        # Now sleep enough grace time and check that softlimit got enforced
        sleep $((bgrace + 1))
        echo "Try to write 1 one more block after grace..."
@@ -89,13 +89,13 @@ test_grace()
        # And now the softlimit test for inodes
        # First reset space limits so that we don't have problems with
        # space reservations on XFS
-       setquota -$type $qa_user 0 0 3 100 $SCRATCH_MNT
+       setquota -$type $qa_user 0 0 3 100 $SCRATCH_MNT 
        echo "Create 2 more files, over the inode softlimit..."
        su $qa_user -c "touch $dir/file3 $dir/file4" 2>&1 >>$seqres.full | \
                _filter_scratch | tee -a $seqres.full
        repquota -v -$type $SCRATCH_MNT  | grep -v "^root" >>$seqres.full 2>&1
        # Reset grace time here, make below grace time test more accurate
-       setquota -$type $qa_user -T $bgrace $igrace $SCRATCH_MNT 2>/dev/null
+       setquota -$type $qa_user -T $bgrace $igrace $SCRATCH_MNT >>$seqres.full 2>&1
        # Wait and check grace time enforcement
        sleep $((igrace+1))
        echo "Try to create one more inode after grace..."
index b42e7e5b3dd350bbf02293ffe053678fa946f751..ce724f381039ff8568f5ec66c5471a4d6c28cedc 100755 (executable)
@@ -24,7 +24,7 @@ _require_populate_commands
 _require_xfs_db_command "fuzz"
 
 echo "Format and populate"
-_scratch_populate_cached nofill > $seqres.full 2>&1
+_scratch_populate_cached nofill >> $seqres.full 2>&1
 
 filter_nbrepair() {
        grep rebuilding | sed -e 's/directory inode [0-9]*/directory inode XXX/g'