From: hejianet <hejianet@gmail.com>
To: Dave Chinner <david@fromorbit.com>
Cc: fstests@vger.kernel.org
Subject: Re: [PATCH 2/2] fstests: give user friendly prompts for already mounted dir
Date: Mon, 11 Jan 2016 13:20:08 +0800 [thread overview]
Message-ID: <56933B88.5080608@gmail.com> (raw)
In-Reply-To: <20160110232938.GF10456@dastard>
在 1/11/16 7:29 AM, Dave Chinner 写道:
> On Thu, Jan 07, 2016 at 02:37:29PM +0800, Jia He wrote:
>> This adds user friendly prompts to output the already mounted line from _mount.
>> xfstests will do the cleanup (ie. umount) and user can not get the mount directory
>> information.
>>
>> Signed-off-by: Jia He <hejianet@gmail.com>
>> ---
>> common/rc | 8 ++++++--
>> 1 file changed, 6 insertions(+), 2 deletions(-)
>>
>> diff --git a/common/rc b/common/rc
>> index d33e3fb..5b40fb4 100644
>> --- a/common/rc
>> +++ b/common/rc
>> @@ -1271,7 +1271,9 @@ _require_scratch_nocheck()
>> # if it's mounted, make sure its on $SCRATCH_MNT
>> if ! _mount | grep -F $SCRATCH_DEV | grep -q $SCRATCH_MNT
>> then
>> - echo "\$SCRATCH_DEV is mounted but not on \$SCRATCH_MNT - aborting"
>> + echo "\$SCRATCH_DEV=$SCRATCH_DEV is mounted but not on \$SCRATCH_MNT=$SCRATCH_MNT - aborting"
>> + echo "Already mounted result:"
>> + _mount | grep -F $SCRATCH_DEV
>> exit 1
>> fi
> Should use a temporary local variable rather than looking at the
> mount table twice. e.g.
>
> mount_rec=`_mount | grep -F $SCRATCH_DEV`
> echo $mount_rec | grep -q $SCRATCH_MNT
> if [ $? -ne 0 ]; then
> # new error message
> echo $mount_rec
> fi
Thanks, Dave
v3 is sending.
B.R.
Justin
>
> Cheers,
>
> Dave.
prev parent reply other threads:[~2016-01-11 5:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-07 6:37 [PATCH 0/2] fstests: help user to troubleshoot the re-mount issue quickly Jia He
2016-01-07 6:37 ` [PATCH 1/2] fstests: comments to prevent from adding "/" to the end of 2 environment variables Jia He
2016-01-07 10:27 ` Eryu Guan
2016-01-07 14:03 ` hejianet
2016-01-08 9:39 ` Eryu Guan
2016-01-08 13:28 ` hejianet
2016-01-07 6:37 ` [PATCH 2/2] fstests: give user friendly prompts for already mounted dir Jia He
2016-01-10 23:29 ` Dave Chinner
2016-01-11 5:20 ` hejianet [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=56933B88.5080608@gmail.com \
--to=hejianet@gmail.com \
--cc=david@fromorbit.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