public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: Eryu Guan <eguan@redhat.com>
To: Brian Foster <bfoster@redhat.com>
Cc: fstests@vger.kernel.org
Subject: Re: [PATCH v3] fstests: teach _scratch_mkfs to handle mkfs option conflicts
Date: Sun, 18 Dec 2016 11:48:18 +0800	[thread overview]
Message-ID: <20161218034818.GA1859@eguan.usersys.redhat.com> (raw)
In-Reply-To: <20161216142208.GC8447@bfoster.bfoster>

On Fri, Dec 16, 2016 at 09:22:09AM -0500, Brian Foster wrote:
> On Mon, Dec 05, 2016 at 04:42:56PM +0800, Eryu Guan wrote:
> > Currently in _scratch_mkfs only xfs and ext4 could handle the mkfs
> > failure caused by conflicts between $MKFS_OPTIONS and mkfs options
> > specified by tests, because of _scratch_mkfs_xfs and
> > _scratch_mkfs_ext4. This is a very useful functionality that allows
> > tests to specify mkfs options safely and to test specific fs
> > configurations, without worrying about mkfs failures caused by these
> > options.
> > 
> > Now teach _scratch_mkfs to handle such mkfs option conflicts for
> > other filesystems too, i.e. mkfs again only with mkfs options
> > specified by tests. Also add the ability to filter unnecessary
> > messages from mkfs stderr.
> > 
> > Also update some btrfs tests to throw away _scratch_mkfs stdout,
> > because previously _scratch_mkfs did this for btrfs.
> > 
> > Signed-off-by: Eryu Guan <eguan@redhat.com>
> > ---
> > 
> > v3:
> > - rebase against master HEAD, some changes go to common/xfs
> > 
> > v2:
> > - return in each case if fstyp is special-handled in _scratch_mkfs
> > - introduce _scratch_do_mkfs helper and convert _scratch_mkfs_xfs and
> >   _scratch_mkfs_ext4 to use it too. I'm not good at naming functions,
> >   please suggest if it's badly named..
> > - update some btrfs tests to avoid failures caused by mkfs stdout output
> > 
> >  common/rc       | 180 +++++++++++++++++++++++++++++++++-----------------------
> >  common/xfs      |  47 ++++-----------
> >  tests/btrfs/028 |   2 +-
> >  tests/btrfs/121 |   2 +-
> >  tests/btrfs/122 |   2 +-
> >  tests/btrfs/123 |   2 +-
> >  tests/btrfs/126 |   2 +-
> >  7 files changed, 126 insertions(+), 111 deletions(-)
> > 
> > diff --git a/common/rc b/common/rc
> > index 2719b23..7e45c14 100644
> > --- a/common/rc
> > +++ b/common/rc
> > @@ -410,6 +410,52 @@ _scratch_mkfs_options()
> >      echo $SCRATCH_OPTIONS $MKFS_OPTIONS $* $SCRATCH_DEV
> >  }
> >  
> > +# Do the actual mkfs work on SCRATCH_DEV. Firstly mkfs with both MKFS_OPTIONS
> > +# and user specified mkfs options, if that fails (due to conflicts between mkfs
> > +# options), do a second mkfs with only user provided mkfs options.
> > +#
> > +# First param is the mkfs command without any mkfs optoins and device.
> 
> Typo here:					      options

Will fix at commit time.

> 
> Otherwise looks Ok to me:
> 
> Reviewed-by: Brian Foster <bfoster@redhat.com>

Thanks for the review!

Eryu

      reply	other threads:[~2016-12-18  3:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-05  8:42 [PATCH v3] fstests: teach _scratch_mkfs to handle mkfs option conflicts Eryu Guan
2016-12-15  7:04 ` Eryu Guan
2016-12-16 14:22 ` Brian Foster
2016-12-18  3:48   ` Eryu Guan [this message]

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=20161218034818.GA1859@eguan.usersys.redhat.com \
    --to=eguan@redhat.com \
    --cc=bfoster@redhat.com \
    --cc=fstests@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