From: Dave Chinner Date: Fri, 15 Mar 2013 11:53:31 +0000 (+0000) Subject: xfstests: correct quota file count for --large-fs X-Git-Tag: v2022.05.01~3499 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=5cc810fb3c579534e57c87bac449f6d211c98c8c;p=xfstests-dev.git xfstests: correct quota file count for --large-fs 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 Reviewed-by: Rich Johnston Signed-off-by: Rich Johnston --- diff --git a/050 b/050 index cf70b5ac..acca654d 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 96d5077d..319680de 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