All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eryu Guan <eguan@redhat.com>
To: Jia He <hejianet@gmail.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 18:27:23 +0800	[thread overview]
Message-ID: <20160107102723.GD21019@eguan.usersys.redhat.com> (raw)
In-Reply-To: <1452148649-22451-2-git-send-email-hejianet@gmail.com>

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"`
+
 # make sure this script returns success
 /bin/true

Thanks,
Eryu

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

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=20160107102723.GD21019@eguan.usersys.redhat.com \
    --to=eguan@redhat.com \
    --cc=fstests@vger.kernel.org \
    --cc=hejianet@gmail.com \
    /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.