On Wed, Jan 04, 2017 at 05:05:01PM -0800, Darrick J. Wong wrote: > Fix the reflink quota tests to su to the fsgqa user so that we actually > test enforcement of quotas. Seems that XFS enforces user quotas even > if root is writing to a user file, whereas everything else lets root > writes through. Also clean up some of the variable usage and > _require_user. > > Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx> > --- > v2: Refactor the quota block reporting into a helper function and > port all the existing tests. Fix "fsgqa"/$qa_user usage too. > --- > common/quota | 10 ++++++++++ > tests/generic/305 | 22 ++++++++++------------ > tests/generic/305.out | 30 +++++++++++++++--------------- > tests/generic/326 | 22 ++++++++++------------ > tests/generic/326.out | 30 +++++++++++++++--------------- > tests/generic/327 | 19 +++++++++---------- > tests/generic/327.out | 12 ++++++------ > tests/generic/328 | 29 ++++++++++++++--------------- > tests/generic/328.out | 28 ++++++++++++++-------------- > tests/xfs/213 | 22 ++++++++++------------ > tests/xfs/213.out | 30 +++++++++++++++--------------- > tests/xfs/214 | 22 ++++++++++------------ > tests/xfs/214.out | 30 +++++++++++++++--------------- > 13 files changed, 153 insertions(+), 153 deletions(-) > > > diff --git a/common/quota b/common/quota > index d4ae861..5c6e680 100644 > --- a/common/quota > +++ b/common/quota > @@ -302,5 +302,15 @@ _check_quota_usage() > } > } > > +# Report the block usage of root, $qa_user, and nobody > +_report_quota_blocks() { > + repquota $SCRATCH_MNT | egrep "^($qa_user|root|nobody)" | awk '{print $1, $3, $4, $5}' > +} > + > +# Report the inode usage of root, $qa_user, and nobody > +_report_quota_inodes() { > + repquota $SCRATCH_MNT | egrep "^($qa_user|root|nobody)" | awk '{print $1, $6, $7, $8}' > +} > + Name them as _scratch_report_quota_blocks|inodes ? Since they're assuming mount point is SCRATCH_MNT. Or take the mount point as the first argument? Thanks, Eryu -- To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html