# corruptions and verify that xfs_repair detects and repairs the filesystem to
# a consistent state.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/repair
+# Override the default cleanup function.
_cleanup()
{
cd /
_scratch_unmount 2>/dev/null
rm -f $tmp.*
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
_sparse_inode_populate()
{
_require_xfs_mkfs_finobt
_require_xfs_finobt
-rm -f $seqres.full
-
_scratch_mkfs_xfs "-m crc=1,finobt=1 -d agcount=2" | _filter_mkfs 2>$seqres.full
# sparsely populate the fs such that we create records with free inodes