public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Alex Elder <aelder@sgi.com>
Cc: Christoph Hellwig <hch@infradead.org>, xfs@oss.sgi.com
Subject: Re: [PATCH] xfstests: support post-udev device mapper nodes
Date: Mon, 2 May 2011 15:35:42 -0400	[thread overview]
Message-ID: <20110502193542.GA28530@infradead.org> (raw)
In-Reply-To: <1304364779.3077.41.camel@doink>

On Mon, May 02, 2011 at 02:32:59PM -0500, Alex Elder wrote:
> I'm not 100% sure I'm parsing the above right.  What
> I read is that, although we want to use the "real"
> device (not the link), the utilities tend to report
> the /dev/mapper names.  Therefore we want to use
> /dev/mapper names and internally translate them to
> their real devices.

We as in xfstests want to use whatever everyone else uses to make
our life easier for parsing mount table output, df output, etc,
and that's normally the /dev/mapper/ name.  The only thing that
can't cope with the symlink there is the _is_block_dev helper.

> > +    _dev=$1
> > +    if [ -L ${_dev} ]; then
> > +        _dev=`readlink -f ${_dev}`
> 
> Although it typically shouldn't, if the "readlink -f" fails,
> it will make _dev have an empty value...
> 
> > +    fi
> > +
> > +    if [ -b ${_dev} ]; then
> 
> ...which will lead to some sort of shell "syntax error"
> message here, which is rather unhelpful.
> 
> At a minimum, I think putting quotes around it here
> would avoid that (but you should test), i.e.,
>     if [ -b "${_dev}" ]; then

Ok.

> This and the next one appear to be junk that should
> be removed.

Indeed.

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

      reply	other threads:[~2011-05-02 19:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-02 16:02 [PATCH] xfstests: support post-udev device mapper nodes Christoph Hellwig
2011-05-02 19:32 ` Alex Elder
2011-05-02 19:35   ` Christoph Hellwig [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=20110502193542.GA28530@infradead.org \
    --to=hch@infradead.org \
    --cc=aelder@sgi.com \
    --cc=xfs@oss.sgi.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox