public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Eryu Guan <eguan@redhat.com>
Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org
Subject: Re: [PATCH 4/7] reflink: fix quota tests to work properly
Date: Mon, 9 Jan 2017 11:30:38 -0800	[thread overview]
Message-ID: <20170109193038.GA14033@birch.djwong.org> (raw)
In-Reply-To: <20170109085514.GZ1859@eguan.usersys.redhat.com>

On Mon, Jan 09, 2017 at 04:55:14PM +0800, Eryu Guan wrote:
> 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@oracle.com>
> > ---
> > 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?

Ok, changed to require a mountpoint as a first arg.

--D

> 
> Thanks,
> Eryu
> --
> To unsubscribe from this list: send the line "unsubscribe fstests" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2017-01-09 19:30 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-05  1:04 [PATCH 0/7] xfstests: misc reflink test fixes Darrick J. Wong
2017-01-05  1:04 ` [PATCH 1/7] ocfs2: test reflinking to inline data files Darrick J. Wong
2017-01-05  1:04 ` [PATCH 2/7] common: add leading underscore to get_block_size Darrick J. Wong
2017-01-09 10:20   ` Eryu Guan
2017-01-09 21:32     ` Darrick J. Wong
2017-01-05  1:04 ` [PATCH 3/7] ocfs2/reflink: fix file block size reporting Darrick J. Wong
2017-01-05  1:05 ` [PATCH 4/7] reflink: fix quota tests to work properly Darrick J. Wong
2017-01-09  8:55   ` Eryu Guan
2017-01-09 19:30     ` Darrick J. Wong [this message]
2017-01-09 20:53   ` [PATCH v2 " Darrick J. Wong
2017-01-05  1:05 ` [PATCH 5/7] reflink: make error reporting consistent when simulating EIO Darrick J. Wong
2017-01-05  1:05 ` [PATCH 6/7] dedupe: fix consistent error message prefixes for dedupe tests Darrick J. Wong
2017-01-09  9:26   ` Eryu Guan
2017-01-09 20:36     ` Darrick J. Wong
2017-01-09 20:54   ` [PATCH v2 " Darrick J. Wong
2017-01-05  1:05 ` [PATCH 7/7] xfs/ext4: check negative inode size Darrick J. Wong
2017-01-09  9:36   ` Eryu Guan
2017-01-09 20:36     ` Darrick J. Wong
2017-01-09 20:55   ` [PATCH v2 " Darrick J. Wong
2017-01-10  4:40     ` Eryu Guan
2017-01-10  4:52       ` Darrick J. Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170109193038.GA14033@birch.djwong.org \
    --to=darrick.wong@oracle.com \
    --cc=eguan@redhat.com \
    --cc=fstests@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox