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
+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