common: don't check scratch dev on all tests
authorDave Chinner <dchinner@redhat.com>
Mon, 8 Sep 2014 10:48:45 +0000 (20:48 +1000)
committerDave Chinner <david@fromorbit.com>
Mon, 8 Sep 2014 10:48:45 +0000 (20:48 +1000)
commitc941f156e93cfde79a11de422ccb78b4dbe513c6
treef581b74d00c97f87f1672159b78eecb3fcadf35d
parentf7d0a306291ade6f2b91c1073e11fe5a663d6266
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>
common/rc
tests/generic/311
tests/generic/321
tests/generic/322
tests/xfs/001
tests/xfs/002
tests/xfs/005
tests/xfs/045
tests/xfs/049
tests/xfs/202
tests/xfs/205