All of lore.kernel.org
 help / color / mirror / Atom feed
From: Masami Hiramatsu <mhiramat@kernel.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: shuah <shuah@kernel.org>, Po-Hsu Lin <po-hsu.lin@canonical.com>,
	mingo@redhat.com, linux-kselftest@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] selftests/ftrace: skip ftrace test if FTRACE was not enabled
Date: Wed, 3 Jul 2019 17:20:33 +0900	[thread overview]
Message-ID: <20190703172033.7b575566e6e2f269bcc93cc5@kernel.org> (raw)
In-Reply-To: <20190702231808.36845f83@gandalf.local.home>

On Tue, 2 Jul 2019 23:18:08 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:

> On Wed, 3 Jul 2019 12:09:53 +0900
> Masami Hiramatsu <mhiramat@kernel.org> wrote:
> 
> > > Would something like that work?  
> > 
> > For older kernel, I think we'd better try to mount debugfs first.
> 
> Sure, that's pretty trivial to do. Or what I was thinking, try it if it
> fails:
> 
>  	if [ -z "$TRACING_DIR" ]; then
>  	  save_err=$err_ret
>  	  err_ret=$err_skip
> 	  if mount -t tracefs nodev /sys/kernel/tracing; then
>  	    TRACING_DIR="/sys/kernel/tracing"
> 	  elif mount -t debugfs nodev /sys/kernel/debug; then
>  	    TRACING_DIR="/sys/kernel/debug/tracing"
> 	  else
> 	    errexit "debugfs is not configured in this kernel"
> 	  fi
> 	  if [ ! -d "$TRACING_DIR" ]; then
> 	    errexit "ftrace is not configured in this kernel"
> 	  fi
>  	  err_ret=$save_err
>  	fi

This looks good to me :)

Thank you,

> 
> -- Steve


-- 
Masami Hiramatsu <mhiramat@kernel.org>

  reply	other threads:[~2019-07-03  8:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-02  6:23 [PATCH] selftests/ftrace: skip ftrace test if FTRACE was not enabled Po-Hsu Lin
2019-07-02 19:22 ` shuah
2019-07-03  0:11   ` Masami Hiramatsu
2019-07-03  1:07     ` Steven Rostedt
2019-07-03  3:09       ` Masami Hiramatsu
2019-07-03  3:18         ` Steven Rostedt
2019-07-03  8:20           ` Masami Hiramatsu [this message]
2019-07-04 12:14     ` Po-Hsu Lin

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=20190703172033.7b575566e6e2f269bcc93cc5@kernel.org \
    --to=mhiramat@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=po-hsu.lin@canonical.com \
    --cc=rostedt@goodmis.org \
    --cc=shuah@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 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.