fstests: move test group info to test files
[xfstests-dev.git] / tests / generic / 311
index b631f5edd272b9e4e9c564695cc105b14f1f2dbf..23f37a0d9d7f2dff833170369adb7fd09ba9bcad 100755 (executable)
 # tests that were handcrafted to reproduce bugs in btrfs, so it's also a
 # regression test of sorts.
 #
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-status=1       # failure is the default!
+. ./common/preamble
+_begin_fstest auto metadata log
 
+# Override the default cleanup function.
 _cleanup()
 {
        _cleanup_flakey
 }
-trap "_cleanup; exit \$status" 0 1 2 3 15
 
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
 . ./common/filter
 . ./common/dmflakey
 
@@ -47,7 +42,6 @@ _require_xfs_io_command "falloc"
 
 _require_test_program "fsync-tester"
 
-rm -f $seqres.full
 SEED=1
 testfile=$SCRATCH_MNT/$seq.fsync