fstests: move test group info to test files
[xfstests-dev.git] / tests / generic / 139
index 09df061f0be4c2a63b85a77a249e16670db1aac1..6422f66af4aaa2f266ffc4912af87b542a15598c 100755 (executable)
@@ -9,23 +9,17 @@
 #   - Write to the beginning, middle, and end in direct-io mode
 #   - Check that the files are now different where we say they're different.
 #
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1    # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick clone
 
+# Override the default cleanup function.
 _cleanup()
 {
     cd /
     rm -rf $tmp.* $testdir
 }
 
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
 . ./common/filter
 . ./common/reflink
 
@@ -34,8 +28,6 @@ _require_test_reflink
 _require_cp_reflink
 _require_odirect
 
-rm -f $seqres.full
-
 testdir=$TEST_DIR/test-$seq
 rm -rf $testdir
 mkdir $testdir
@@ -106,7 +98,6 @@ _compare_range $testdir/file1 $blksz $testdir/file2 $blksz 512 \
 _compare_range $testdir/file2 $blksz $testdir/file3 $blksz 512 \
        || echo "Start sections of 2-3 do not match"
 
-
 _compare_range  $testdir/file1 $((blksz * 16 - 1024)) \
                $testdir/file2 $((blksz * 16 - 1024)) 512 \
        || echo "Middle sections of 1-2 do not match"
@@ -123,7 +114,6 @@ _compare_range  $testdir/file2 $((blksz * 48 - 1024)) \
                $testdir/file3 $((blksz * 48 - 1024)) 512 \
        || echo "End sections of 2-3 do not match"
 
-
 _compare_range  $testdir/file1 $((blksz * 16)) \
                $testdir/file2 $((blksz * 16)) 512 \
        || echo "Untouched sections of 1-2 do not match"