fstests: move test group info to test files
[xfstests-dev.git] / tests / btrfs / 095
index 9e16073b2521d7cb804743e20abfa0fe7b4400c3..b3a5fc14e8d53e3e49725d8d18dae3d5466d5641 100755 (executable)
 #
 # The regression was introduced in the 4.2-rc1 Linux kernel.
 #
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1       # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick metadata log
 
+# Override the default cleanup function.
 _cleanup()
 {
        _cleanup_flakey
        rm -f $tmp.*
 }
 
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
 . ./common/filter
 . ./common/dmflakey
 
@@ -37,8 +33,6 @@ _require_dm_target flakey
 _require_cloner
 _require_xfs_io_command "falloc"
 
-rm -f $seqres.full
-
 _scratch_mkfs >>$seqres.full 2>&1
 _require_metadata_journaling $SCRATCH_DEV
 _init_flakey
@@ -103,7 +97,6 @@ $XFS_IO_PROG -c "pwrite -S 0xbb $((768 * $BLOCK_SIZE)) $((25 * $BLOCK_SIZE))" \
 # The 25 blocks extent has a single back reference and it relates to file offset
 # mapped by 768th block.
 
-
 # Now clone our 25 block extent into offset mapped by 150th block. That offset
 # covers the last 5 blocks of the prealloc extent, the whole 10 block extent and
 # 10 blocks of the hole starting at offset mapped by 165th block.