fstests: move test group info to test files
[xfstests-dev.git] / tests / generic / 520
index 57a2ac72f7bb1d838dee13199e20a5474afd8e59..ad6764c73407aad21721692ddd107082655271e0 100755 (executable)
@@ -9,15 +9,10 @@
 # Test if we create a hard link to a file and persist either of the files, all
 # the names persist.
 #
-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 log
 
+# Override the default cleanup function.
 _cleanup()
 {
        _cleanup_flakey
@@ -25,17 +20,13 @@ _cleanup()
        rm -f $tmp.*
 }
 
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
 . ./common/filter
 . ./common/dmflakey
 
 # 256MB in byte
 fssize=$((2**20 * 256))
 
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
 # real QA test starts here
 _supported_fs generic
 _require_scratch_nocheck
@@ -50,7 +41,6 @@ stat_opt='-c "blocks: %b size: %s inode: %i links: %h"'
 before=""
 after=""
 
-
 # Using _scratch_mkfs instead of cleaning up the  working directory,
 # adds about 10 seconds of delay in total for the 37 tests.
 clean_dir()
@@ -144,7 +134,6 @@ test_link_sync()
        clean_dir
 }
 
-
 # Create different combinations to run the link test
 # Group 0: Both files within root directory
 file_names[0]="foo bar"