[PATCH 13/13] xfstests: correct quota file count for --large-fs
Dave Chinner
david at fromorbit.com
Fri Mar 15 06:53:31 CDT 2013
From: Dave Chinner <dchinner at redhat.com>
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 at redhat.com>
---
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
More information about the xfs
mailing list