public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] ftracetest: Take the first debugfs mount found
Date: Mon, 03 Nov 2014 17:18:34 +0900	[thread overview]
Message-ID: <54573A5A.30409@hitachi.com> (raw)
In-Reply-To: <20141031180655.1deff238@gandalf.local.home>

(2014/11/01 7:06), Steven Rostedt wrote:
> 
> Running ftracetests on a box that mounted debugfs in two locations
> made the ftracetests fail. This is because the tests uses a grep
> of debugfs from the /proc/mounts file to find the debugfs mount
> point, and then appends "/tracing" to that string to get the tracing
> directory.
> 
> If the debugfs directory is mounted twice, then that grep will return
> two answers and appending "/tracing" to a string with two lines will
> not work.
> 
> Use "head -1" to only take the first mount point found.

Indeed :)

> 
> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>

Thank you!


> ---
>  tools/testing/selftests/ftrace/ftracetest | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/ftrace/ftracetest b/tools/testing/selftests/ftrace/ftracetest
> index a8f81c782856..515247601df4 100755
> --- a/tools/testing/selftests/ftrace/ftracetest
> +++ b/tools/testing/selftests/ftrace/ftracetest
> @@ -82,7 +82,7 @@ parse_opts() { # opts
>  }
>  
>  # Parameters
> -DEBUGFS_DIR=`grep debugfs /proc/mounts | cut -f2 -d' '`
> +DEBUGFS_DIR=`grep debugfs /proc/mounts | cut -f2 -d' ' | head -1`
>  TRACING_DIR=$DEBUGFS_DIR/tracing
>  TOP_DIR=`absdir $0`
>  TEST_DIR=$TOP_DIR/test.d
> 


-- 
Masami HIRAMATSU
Software Platform Research Dept. Linux Technology Research Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@hitachi.com



      reply	other threads:[~2014-11-03  8:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-31 22:06 [PATCH] ftracetest: Take the first debugfs mount found Steven Rostedt
2014-11-03  8:18 ` Masami Hiramatsu [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=54573A5A.30409@hitachi.com \
    --to=masami.hiramatsu.pt@hitachi.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rostedt@goodmis.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