]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
xfstests: correct quota file count for --large-fs
authorDave Chinner <dchinner@redhat.com>
Fri, 15 Mar 2013 11:53:31 +0000 (11:53 +0000)
committerRich Johnston <rjohnston@sgi.com>
Tue, 19 Mar 2013 20:16:13 +0000 (15:16 -0500)
The files used to fill space when using --large-fs contribute
towards the quota of uid 0. Modify the quota output filter in test
050 to "hide" these files from the test output.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
050
common.rc

diff --git a/050 b/050
index cf70b5ac8c36c7ee2e0cf8c13297a725b4e936c1..acca654db83c54855faa85acdb9073fd96831cc3 100755 (executable)
--- a/050
+++ b/050
@@ -69,7 +69,13 @@ _filter_report()
        perl -npe '
                s/^\#'$id' /[NAME] /g;
                s/^\#0 \d+ /[ROOT] 0 /g;
-               s/6 days/7 days/g'
+               s/6 days/7 days/g' |
+       perl -npe '
+               $val = 0;
+               if ($ENV{'LARGE_SCRATCH_DEV'}) {
+                       $val = $ENV{'NUM_SPACE_FILES'};
+               }
+               s/(^\[ROOT\] \S+ \S+ \S+ \S+ \[--------\] )(\S+)/$1@{[$2 - $val]}/g'
 }
 
 # The actual point at which limit enforcement takes place for the
index 96d5077d3a39b6ac42e62e3cffa5a810b0b1660d..319680decbb3dd207a808196c2c61e681a49655a 100644 (file)
--- a/common.rc
+++ b/common.rc
@@ -308,6 +308,7 @@ _setup_large_xfs_fs()
                -c "falloc -k 0 $file_size" \
                -c "chattr +d" \
                $SCRATCH_MNT/.use_space 2>&1 > /dev/null
+       export NUM_SPACE_FILES=1
        status=$?
        umount $SCRATCH_MNT
        if [ $status -ne 0 ]; then
@@ -417,6 +418,7 @@ _setup_large_ext4_fs()
                        $SCRATCH_MNT/.use_space.$nfiles 2>&1
                status=$?
        fi
+       export NUM_SPACE_FILES=$nfiles
 
        umount $SCRATCH_MNT
        if [ $status -ne 0 ]; then