fstests: move test group info to test files
[xfstests-dev.git] / tests / generic / 057
index b740580890a43bb9db235b0be4ef9b855ca29818..7e4e305e90c3129ba7a766fe1ceab3130d91ba80 100755 (executable)
 #
 #  Btrfs: fix fsync data loss after adding hard link to inode
 #
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1       # failure is the default!
+. ./common/preamble
+_begin_fstest metadata auto quick log
 
+# Override the default cleanup function.
 _cleanup()
 {
        _cleanup_flakey
        rm -f $tmp.*
 }
-trap "_cleanup; exit \$status" 0 1 2 3 15
 
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
 . ./common/filter
 . ./common/dmflakey
 
@@ -39,8 +33,6 @@ _require_scratch
 _require_hardlinks
 _require_dm_target flakey
 
-rm -f $seqres.full
-
 _scratch_mkfs >> $seqres.full 2>&1
 _require_metadata_journaling $SCRATCH_DEV
 _init_flakey