From: Eryu Guan <eguan@redhat.com>
To: Andreas Gruenbacher <agruenba@redhat.com>
Cc: fstests <fstests@vger.kernel.org>,
"Darrick J . Wong" <darrick.wong@oracle.com>
Subject: Re: [PATCH 1/2] fstests: introduce _scratch_mount_nocheck
Date: Wed, 14 Feb 2018 11:30:47 +0800 [thread overview]
Message-ID: <20180214033047.GM18267@eguan.usersys.redhat.com> (raw)
In-Reply-To: <CAHc6FU5tmwRRCWt+6qY_Tqpr_f3=3CuvTFumhtVaoz9y_DE+MQ@mail.gmail.com>
On Tue, Feb 13, 2018 at 03:11:07PM +0100, Andreas Gruenbacher wrote:
> On 13 February 2018 at 10:12, Eryu Guan <eguan@redhat.com> wrote:
> > _fail test by default if _scratch_mount failed and introduce
> > _scratch_mount_nocheck for tests that need to check mount results
> > themselves.
> >
> > Signed-off-by: Eryu Guan <eguan@redhat.com>
> > ---
[snip]
> > --- a/common/rc
> > +++ b/common/rc
> > @@ -352,13 +352,18 @@ _supports_filetype()
> > esac
> > }
> >
> > +_scratch_mount_nocheck()
> > +{
> > + if [ "$FSTYP" == "overlay" ]; then
> > + _overlay_scratch_mount $*
> > + return $?
> > + fi
> > + _mount -t $FSTYP `_scratch_mount_options $*`
> > +}
> > +
> > _scratch_mount()
> > {
> > - if [ "$FSTYP" == "overlay" ]; then
> > - _overlay_scratch_mount $*
> > - return $?
> > - fi
> > - _mount -t $FSTYP `_scratch_mount_options $*`
> > + _scratch_mount_nocheck $* || _fail "_scratch_mount failed"
>
> I'd change that to "mount failed"; the name of the helper function
> isn't very interesting.
I think it'd be easier to know which mount fails, but sure, I have no
strong preference on it.
>
> > }
> >
> > _scratch_unmount()
> > @@ -397,7 +402,7 @@ _scratch_cycle_mount()
> > opts="-o $opts"
> > fi
> > _scratch_unmount
> > - _scratch_mount "$opts"
> > + _scratch_mount_nocheck "$opts" || _fail "_scratch_cycle_mount failed"
>
> Same here, change to "cycle mount failed" or similar.
OK.
And thanks for the testing feedback!
Eryu
next prev parent reply other threads:[~2018-02-14 3:30 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-13 9:12 [RFC PATCH 0/2] _fail test by default if _scratch_mount fails Eryu Guan
2018-02-13 9:12 ` [PATCH 1/2] fstests: introduce _scratch_mount_nocheck Eryu Guan
2018-02-13 14:11 ` Andreas Gruenbacher
2018-02-14 3:30 ` Eryu Guan [this message]
2018-02-13 9:12 ` [PATCH 2/2] fstests: use _scratch_mount_nocheck where appropriate in tests Eryu Guan
2018-02-13 9:58 ` Amir Goldstein
2018-02-13 10:09 ` Eryu Guan
2018-02-13 10:37 ` Andreas Gruenbacher
2018-02-13 23:31 ` Darrick J. Wong
2018-02-14 3:21 ` Eryu Guan
2018-02-13 14:15 ` [RFC PATCH 0/2] _fail test by default if _scratch_mount fails Andreas Gruenbacher
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=20180214033047.GM18267@eguan.usersys.redhat.com \
--to=eguan@redhat.com \
--cc=agruenba@redhat.com \
--cc=darrick.wong@oracle.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