fstests: move test group info to test files
[xfstests-dev.git] / tests / generic / 351
index feaa7c2ae9f60b1d8648b6cebd55faa31e4d8623..fb16da1659dae8c2dbd58f6102947763d52c6292 100755 (executable)
 # with the logicalsector size, and make sure the fallbacks work for
 # devices that don't support write_same or discard.
 #
-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 7 15
-
-_cleanup()
-{
-    cd /
-    rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+. ./common/preamble
+_begin_fstest blockdev rw punch collapse insert zero
+
+_register_cleanup "_cleanup" BUS
+
+# Import common functions.
 . ./common/filter
 . ./common/scsi_debug
 
@@ -38,7 +27,6 @@ _require_xfs_io_command "fcollapse"
 _require_xfs_io_command "fzero"
 _require_xfs_io_command "fpunch"
 
-
 echo "Create and format"
 dev=$(_get_scsi_debug_dev 4096 4096 0 4 "lbpws=1 lbpws10=1")
 _pwrite_byte 0x62 0 4m $dev >> $seqres.full