common: don't check scratch dev on all tests

Some tests deliberately corrupt  scratch devices and so will fail
the post-test check. Add a "_require_scratch_nocheck" helper
function for such tests to avoid false test failure detection.

Also, ensure that _notrun cleans up the trigger for the post-test
checks. Otherwise the next test to run may try to validate the
scratch/test devices even though they are not used by the test.

Further, _check_xfs_filesystem() causes check to exit if it finds a
corruption. This is extremely annoying as it terminates the entire
test run rather than just reporting that the test fails. Hence add
an "iam != check" test before exiting so that calls from tests will
cause the test to fail, but calls from check won't cause the harness
to exit.

There are still some tests that fail the scratch check, these are
not obvious test failures and so need further investigation to
determine the cause of the failures.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
Dave Chinner
2014-09-08 20:48:45 +10:00
committed by Dave Chinner
parent f7d0a30629
commit c941f156e9
11 changed files with 32 additions and 16 deletions
+1 -1
View File
@@ -63,7 +63,7 @@ _do_bit_test()
# Modify as appropriate.
_supported_fs xfs
_supported_os Linux
_require_scratch
_require_scratch_nocheck
_require_xfs_mkfs_crc
_scratch_mkfs -m crc=0 >/dev/null 2>&1
+1 -1
View File
@@ -50,8 +50,8 @@ _cleanup()
# Modify as appropriate.
_supported_fs xfs
_supported_os Linux
_require_scratch_nocheck
_require_scratch
# So we can explicitly turn it _off_:
_require_xfs_mkfs_crc
+1 -1
View File
@@ -53,7 +53,7 @@ filter_mount()
_supported_fs xfs
_supported_os Linux
_require_scratch
_require_scratch_nocheck
_require_xfs_mkfs_crc
rm -f $seqres.full
+1 -1
View File
@@ -45,7 +45,7 @@ _supported_fs xfs
_supported_os Linux
_require_test
_require_scratch
_require_scratch_nocheck
echo "*** get uuid"
uuid=`_get_existing_uuid`
+1 -2
View File
@@ -60,7 +60,7 @@ _log()
}
_require_nonexternal
_require_scratch
_require_scratch_nocheck
_require_no_large_scratch_dev
_require_loop
_require_ext2
@@ -133,7 +133,6 @@ umount -d $SCRATCH_MNT/test >> $seqres.full 2>&1 \
echo "--- mounts at end (before cleanup)" >> $seqres.full
mount >> $seqres.full
rm -f $seqres.full
# success, all done
status=0
exit
+3 -1
View File
@@ -38,7 +38,9 @@ status=1 # failure is the default!
_supported_fs xfs
_supported_os Linux
_require_scratch
# single AG will cause default xfs_repair to fail. This test is actually
# testing the special corner case option needed to repair a single AG fs.
_require_scratch_nocheck
#
# The AG size is limited to 1TB (or even less with historic xfsprogs),
+2 -1
View File
@@ -37,7 +37,8 @@ status=1 # failure is the default!
_supported_fs xfs
_supported_os Linux
_require_scratch
# single AG will cause xfs_repair to fail checks.
_require_scratch_nocheck
rm -f $seqres.full