public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Shuah Khan <shuahkh@osg.samsung.com>
To: Namhyung Kim <namhyung@kernel.org>, Steven Rostedt <rostedt@goodmis.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	linux-kselftest@vger.kernel.org
Subject: Re: [PATCH 1/2] kselftests/ftrace: Detect tracefs mount point
Date: Tue, 10 May 2016 09:24:51 -0600	[thread overview]
Message-ID: <5731FD43.7090109@osg.samsung.com> (raw)
In-Reply-To: <1462891986-3608-1-git-send-email-namhyung@kernel.org>

On 05/10/2016 08:53 AM, Namhyung Kim wrote:
> Currently ftracetest assumes tracing directory is located under
> $DEBUGFS/tracing.  But it's possible to mount tracefs directly without
> debugfs.
> 
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>

Looks good to me. Steve! Ack if you are good with this patch.
I can get this into 4.8-rc1

thanks,
-- Shuah

> ---
>  tools/testing/selftests/ftrace/ftracetest | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/testing/selftests/ftrace/ftracetest b/tools/testing/selftests/ftrace/ftracetest
> index da48812ab95e..4c6a0bf8ba79 100755
> --- a/tools/testing/selftests/ftrace/ftracetest
> +++ b/tools/testing/selftests/ftrace/ftracetest
> @@ -88,7 +88,12 @@ parse_opts() { # opts
>  
>  # Parameters
>  DEBUGFS_DIR=`grep debugfs /proc/mounts | cut -f2 -d' ' | head -1`
> -TRACING_DIR=$DEBUGFS_DIR/tracing
> +if [ -z "$DEBUGFS_DIR" ]; then
> +    TRACING_DIR=`grep tracefs /proc/mounts | cut -f2 -d' ' | head -1`
> +else
> +    TRACING_DIR=$DEBUGFS_DIR/tracing
> +fi
> +
>  TOP_DIR=`absdir $0`
>  TEST_DIR=$TOP_DIR/test.d
>  TEST_CASES=`find_testcases $TEST_DIR`
> @@ -102,7 +107,7 @@ parse_opts $*
>  [ $DEBUG -ne 0 ] && set -x
>  
>  # Verify parameters
> -if [ -z "$DEBUGFS_DIR" -o ! -d "$TRACING_DIR" ]; then
> +if [ -z "$TRACING_DIR" -o ! -d "$TRACING_DIR" ]; then
>    errexit "No ftrace directory found"
>  fi
>  
> 

  parent reply	other threads:[~2016-05-10 15:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-10 14:53 [PATCH 1/2] kselftests/ftrace: Detect tracefs mount point Namhyung Kim
2016-05-10 14:53 ` [PATCH 2/2] kselftests/ftrace: Add a test case for event pid filtering Namhyung Kim
2016-05-10 15:24   ` Shuah Khan
2016-05-16 16:12     ` Shuah Khan
2016-05-10 15:24 ` Shuah Khan [this message]
2016-05-16 16:12   ` [PATCH 1/2] kselftests/ftrace: Detect tracefs mount point Shuah Khan

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=5731FD43.7090109@osg.samsung.com \
    --to=shuahkh@osg.samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=namhyung@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