All of lore.kernel.org
 help / color / mirror / Atom feed
From: hejianet <hejianet@gmail.com>
To: Eryu Guan <eguan@redhat.com>
Cc: fstests@vger.kernel.org
Subject: Re: [PATCH 1/2] fstests: comments to prevent from adding "/" to the end of 2 environment variables
Date: Thu, 7 Jan 2016 22:03:53 +0800	[thread overview]
Message-ID: <568E7049.1020508@gmail.com> (raw)
In-Reply-To: <20160107102723.GD21019@eguan.usersys.redhat.com>

Hi Eryu Guan
Thanks for the comments,  reasonable to me.
I will add it into v2 patch together with other
在 1/7/16 6:27 PM, Eryu Guan 写道:
> On Thu, Jan 07, 2016 at 02:37:28PM +0800, Jia He wrote:
>> This adds comments to prevent user from adding "/" to the end of TEST_DIR and
>> SCRATCH_MNT
> Instead of adding comments, how about removing the trailing "/" in the
> code, something like:
>
> diff --git a/common/config b/common/config
> index e82d279..cb34fd7 100644
> --- a/common/config
> +++ b/common/config
> @@ -551,5 +551,10 @@ if [ -z "$CONFIG_INCLUDED" ]; then
>   	[ -z "$FSCK_OPTIONS" ] && _fsck_opts
>   fi
>   
> +# canonicalize the mount points
> +# this follows symlinks and removes all trailing "/"s
> +export TEST_DIR=`readlink -e "$TEST_DIR"`
> +export SCRATCH_MNT=`readlink -e "$SCRATCH_MNT"`
> +
Thanks, but maybe it will empty the invalid path and the user doesn't know
why his TEST_DIR/SCRATCH_MNT are assigned to NULL?

eg.
[root@host ~]# ls /root/not_existed
ls: cannot access /root/not_existed: No such file or directory
[root@host ~]# readlink -e /root/not_existed
[root@host ~]#
>   # make sure this script returns success
>   /bin/true
>
> Thanks,
> Eryu
>


  reply	other threads:[~2016-01-07 14:03 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 [this message]
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

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=568E7049.1020508@gmail.com \
    --to=hejianet@gmail.com \
    --cc=eguan@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.