common/rc: generalize _get_filesize()
[xfstests-dev.git] / tests / generic / 013
index f66cade11826a7025cd23c5a6bc6e3dd490f2964..bc596102783e905a811de9f2c6b63c6b7f076f6a 100755 (executable)
@@ -1,27 +1,11 @@
 #! /bin/bash
-# FS QA Test No. 013
-#
-# fsstress
-#
-#-----------------------------------------------------------------------
+# SPDX-License-Identifier: GPL-2.0
 # Copyright (c) 2000-2002 Silicon Graphics, Inc.  All Rights Reserved.
 #
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it would be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write the Free Software Foundation,
-# Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+# FS QA Test No. 013
 #
-#-----------------------------------------------------------------------
+# fsstress
 #
-
 seq=`basename $0`
 seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
@@ -35,19 +19,9 @@ _cleanup()
 {
     cd /
     # we might get here with a RO FS
-    mount -o remount,rw $TEST_DEV >/dev/null 2>&1
+    _test_cycle_mount
     # now remove fsstress directory.
-    # N.B. rm(1) on IRIX can find problems when building up a long pathname
-    # such that what it has is greater the 1024 chars and will
-    # stop and complain - so get rid of complaint
-    # Ref. pv#935754
-    rm -rf $testdir/fsstress.$$.* 2>&1 | grep -v 'Path too long'
-    _cleanup_testdir
-}
-
-_filesize()
-{
-    ls -l $1 | $AWK_PROG '{print "    filesize = " $5}'
+    rm -rf $TEST_DIR/fsstress.$$.*
 }
 
 # get standard environment, filters and checks
@@ -60,7 +34,7 @@ _do_test()
     _param="$2"
     _count="$3"
 
-    out=$testdir/fsstress.$$.$_n
+    out=$TEST_DIR/fsstress.$$.$_n
     rm -rf $out
     if ! mkdir $out
     then
@@ -91,9 +65,8 @@ _do_test()
 
 # real QA test starts here
 _supported_fs generic
-_supported_os IRIX Linux
-
-_setup_testdir
+_supported_os Linux
+_require_test
 
 rm -f $seqres.full
 echo "brevity is wit..."