public inbox for fstests@vger.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: Fri, 8 Jan 2016 21:28:30 +0800	[thread overview]
Message-ID: <568FB97E.7020202@gmail.com> (raw)
In-Reply-To: <20160108093912.GH21019@eguan.usersys.redhat.com>

Hi Eryu
Yes, you are wright

root@justin-u1504:~/xfstests/xfstests# ./check -d xfs/003
common/config: Error: $TEST_DIR (/root/xfstests/test1) is not a directory

B.R.
Justin

在 1/8/16 5:39 PM, Eryu Guan 写道:
> On Thu, Jan 07, 2016 at 10:03:53PM +0800, hejianet wrote:
>> 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?
> These values have been proved to be a directory in get_next_config(), if
> they're not, the test errors out there.
>
> Thanks,
> Eryu
>


  reply	other threads:[~2016-01-08 13:28 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 [this message]
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=568FB97E.7020202@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox