From: Eryu Guan <eguan@redhat.com>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: fstests@vger.kernel.org, Andreas Gruenbacher <agruenba@redhat.com>
Subject: Re: [PATCH 2/2] fstests: use _scratch_mount_nocheck where appropriate in tests
Date: Wed, 14 Feb 2018 11:21:01 +0800 [thread overview]
Message-ID: <20180214032101.GL18267@eguan.usersys.redhat.com> (raw)
In-Reply-To: <20180213233140.GA5208@magnolia>
On Tue, Feb 13, 2018 at 03:31:40PM -0800, Darrick J. Wong wrote:
> On Tue, Feb 13, 2018 at 05:12:03PM +0800, Eryu Guan wrote:
> > Also remove redundant status checks of _scratch_mount.
> >
> > Signed-off-by: Eryu Guan <eguan@redhat.com>
> > ---
>
> <skipping to the generic and xfs tests>
>
> > diff --git a/tests/generic/054 b/tests/generic/054
> > index 12f471a19090..84b8271a11bd 100755
> > --- a/tests/generic/054
> > +++ b/tests/generic/054
> > @@ -83,7 +83,7 @@ for s in sync nosync ; do
> >
> > # mount the FS
> > _echofull "mount"
> > - if ! _scratch_mount >>$seqres.full 2>&1; then
> > + if ! _scratch_mount_nocheck >>$seqres.full 2>&1; then
> > _echofull "mount failed: $MOUNT_OPTIONS"
> > continue
> > fi
> > @@ -118,7 +118,7 @@ for s in sync nosync ; do
> > _print_logstate
> >
> > _echofull "mount with replay"
> > - _scratch_mount >>$seqres.full 2>&1 \
> > + _scratch_mount_nocheck >>$seqres.full 2>&1 \
> > || _fail "mount failed: $MOUNT_OPTIONS"
>
> nocheck || fail ??
>
> I wonder if the fail message should always spit out the mount options
> that were tried?
Seems there's no need to do so in this case, as we know what
$MOUNT_OPTIONS we're using. We could dump the specific mount options if
the test uses non-default options and really cares about it, and this
should be done case-by-case.
>
> > diff --git a/tests/generic/068 b/tests/generic/068
> > index bd12278cdd25..91b327866c54 100755
> > --- a/tests/generic/068
> > +++ b/tests/generic/068
> > @@ -62,7 +62,7 @@ echo "*** MKFS ***" >>$seqres.full
> > echo "" >>$seqres.full
> > _scratch_mkfs >>$seqres.full 2>&1 \
> > || _fail "mkfs failed"
> > -_scratch_mount >>$seqres.full 2>&1 \
> > +_scratch_mount_nocheck >>$seqres.full 2>&1 \
> > || _fail "mount failed"
>
> Can this remain _scratch_mount, since we _fail anyway?
>
> (There are more of these scattered throughout.)
Sure. I thought it'd be better to keep dumping mount error message to
$seqres.full and keep the pretty format :) But seems that's not
necessary, the error message would break golden image anyway.
I'll revisit the tests with similar patterns.
Thanks,
Eryu
next prev parent reply other threads:[~2018-02-14 3:21 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
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 [this message]
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=20180214032101.GL18267@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