xfs: fix more xfs_db open-coding instances
[xfstests-dev.git] / tests / xfs / 004
index 4999558d62dcfa1a7b5553b31f80e39b47ece1de..09da2fea8a254c1c473b830bfe6c8be9b60b180f 100755 (executable)
@@ -24,8 +24,6 @@
 
 seq=`basename $0`
 seqres=$RESULT_DIR/$seq
-seqres=$RESULT_DIR/$seq
-seqres=$RESULT_DIR/$seq
 echo "QA output created by $seq"
 
 here=`pwd`
@@ -34,7 +32,7 @@ status=0
 
 _cleanup()
 {
-       umount $SCRATCH_MNT
+       _scratch_unmount
        rm -f $tmp.*
        exit $status
 }
@@ -50,11 +48,10 @@ _populate_scratch()
        dd if=/dev/zero of=$SCRATCH_MNT/goo count=400 bs=4096 >/dev/null 2>&1 &
        dd if=/dev/zero of=$SCRATCH_MNT/moo count=800 bs=4096 >/dev/null 2>&1 &
        wait
-       umount $SCRATCH_MNT                     # flush everything
+       _scratch_unmount                        # flush everything
        _scratch_mount                          # and then remount
 }
 
-
 # get standard environment, filters and checks
 . ./common/rc
 . ./common/filter
@@ -63,7 +60,6 @@ _populate_scratch()
 _supported_fs xfs
 _supported_os IRIX Linux
 
-_need_to_be_root
 _require_scratch
 _require_no_large_scratch_dev
 
@@ -78,7 +74,7 @@ eval `$DF_PROG $SCRATCH_MNT 2>&1 \
 echo "df gave: blocks=$blocks used=$used avail=$avail" >>$seqres.full
 echo "blocksize from mkfs is '$dbsize'" >>$seqres.full
 
-xfs_db -r -c "freesp -s" $SCRATCH_DEV >$tmp.xfs_db
+_scratch_xfs_db -r -c "freesp -s"  >$tmp.xfs_db
 echo "xfs_db for $SCRATCH_DEV" >>$seqres.full
 cat $tmp.xfs_db >>$seqres.full