]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
xfstests: always use test option when checking large scratch device
authorDave Chinner <dchinner@redhat.com>
Fri, 15 Mar 2013 11:53:26 +0000 (11:53 +0000)
committerRich Johnston <rjohnston@sgi.com>
Tue, 19 Mar 2013 20:16:13 +0000 (15:16 -0500)
Some tests call _check_scratch_device directly and when using a
large filesystem this needs to run with a -t option to avoid
consuming large amounts of memory. Make this happen in all cases
that the scratch device is checked.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
017
common.rc

diff --git a/017 b/017
index 7db46675d4ffd00461175b9eda4a0c1927031de7..fb923750df278fc720e7062a302b879ec22f7c19 100755 (executable)
--- a/017
+++ b/017
@@ -48,9 +48,6 @@ _supported_os Linux
 
 _require_scratch
 
-checkopts=""
-[ "$USE_BIG_LOOPFS" = yes ] && checkopts=-t
-
 echo "*** init FS"
 
 rm -f $seq.full
@@ -82,8 +79,8 @@ do
         echo ""                             >>$seq.full
         echo "*** XFS_CHECK ***"            >>$seq.full
         echo ""                             >>$seq.full
-        _scratch_xfs_check $checkopts       >>$seq.full 2>&1 \
-            || _fail "xfs_check $checkopts failed"
+        _scratch_xfs_check                  >>$seq.full 2>&1 \
+            || _fail "xfs_check failed"
         _scratch_mount -o remount,rw \
             || _fail "remount rw failed"
 done
index ee4f522803f9ae945944de0d94ecb8b00fb58e54..102657250b284535ae768b2e787fd64c8feef397 100644 (file)
--- a/common.rc
+++ b/common.rc
@@ -475,6 +475,8 @@ _scratch_xfs_check()
     SCRATCH_OPTIONS=""
     [ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_LOGDEV" ] && \
         SCRATCH_OPTIONS="-l $SCRATCH_LOGDEV"
+    [ "$LARGE_SCRATCH_DEV" = yes ] && \
+        SCRATCH_OPTIONS=$SCRATCH_OPTIONS" -t"
     $XFS_CHECK_PROG $SCRATCH_OPTIONS $* $SCRATCH_DEV
 }