xfs
[Top] [All Lists]

[PATCH 13/13] xfstests: correct quota file count for --large-fs

To: xfs@xxxxxxxxxxx
Subject: [PATCH 13/13] xfstests: correct quota file count for --large-fs
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Fri, 15 Mar 2013 22:53:31 +1100
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1363348411-21867-1-git-send-email-david@xxxxxxxxxxxxx>
References: <1363348411-21867-1-git-send-email-david@xxxxxxxxxxxxx>
From: Dave Chinner <dchinner@xxxxxxxxxx>

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@xxxxxxxxxx>
---
 050       |    8 +++++++-
 common.rc |    2 ++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/050 b/050
index cf70b5a..acca654 100755
--- 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
diff --git a/common.rc b/common.rc
index 96d5077..319680d 100644
--- 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
-- 
1.7.10.4

<Prev in Thread] Current Thread [Next in Thread>