return $ret
}
-# bail out, setting up .notrun file
+# bail out, setting up .notrun file. Need to kill the filesystem check files
+# here, otherwise they are set incorrectly for the next test.
#
_notrun()
{
echo "$*" > $seqres.notrun
echo "$seq not run: $*"
+ rm -f ${RESULT_DIR}/require_test
+ rm -f ${RESULT_DIR}/require_scratch
status=0
exit
}
}
# this test needs a scratch partition - check we're ok & unmount it
-#
-_require_scratch()
+# No post-test check of the device is required. e.g. the test intentionally
+# finishes the test with the filesystem in a corrupt state
+_require_scratch_nocheck()
{
case "$FSTYP" in
nfs*)
exit 1
fi
fi
- touch ${RESULT_DIR}/require_scratch
+ rm -f ${RESULT_DIR}/require_scratch
+}
+
+# we need the scratch device and it should be checked post test.
+_require_scratch()
+{
+ _require_scratch_nocheck
+ touch ${RESULT_DIR}/require_scratch
}
+
# this test needs a test partition - check we're ok & unmount it
#
_require_test()
if [ $ok -eq 0 ]; then
status=1
- exit 1
+ if [ "$iam" != "check" ]; then
+ exit 1
+ fi
fi
return 0
}
_require_nonexternal
-_require_scratch
+_require_scratch_nocheck
_require_no_large_scratch_dev
_require_loop
_require_ext2
echo "--- mounts at end (before cleanup)" >> $seqres.full
mount >> $seqres.full
-rm -f $seqres.full
# success, all done
status=0
exit
_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),