All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sandeep Patil <sspatil@google.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] tracing: ftrace_lib: check if tracing_max_latency exists.
Date: Wed,  8 Aug 2018 16:40:19 -0700	[thread overview]
Message-ID: <20180808234019.241238-1-sspatil@google.com> (raw)

This avoids unnecessary error in ftrace stress test when the
kernel being tested does not have CONFIG_TRACER_MAX_TRACE defined.

Signed-off-by: Sandeep Patil <sspatil@google.com>
---
 testcases/kernel/tracing/ftrace_test/ftrace_lib.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/testcases/kernel/tracing/ftrace_test/ftrace_lib.sh b/testcases/kernel/tracing/ftrace_test/ftrace_lib.sh
index 20cf5e760..ec4f7a557 100755
--- a/testcases/kernel/tracing/ftrace_test/ftrace_lib.sh
+++ b/testcases/kernel/tracing/ftrace_test/ftrace_lib.sh
@@ -100,7 +100,9 @@ restore_old_setting()
 
 	echo nop > current_tracer
 	echo 0 > events/enable
-	echo 0 > tracing_max_latency 2> /dev/null
+	if [ -e tracing_max_latency ]; then
+		echo 0 > tracing_max_latency 2> /dev/null
+	fi
 
 	if [ -e tracing_cpumask ]; then
 		echo $old_tracing_cpumask > tracing_cpumask
-- 
2.18.0.597.ga71716f1ad-goog


             reply	other threads:[~2018-08-08 23:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-08 23:40 Sandeep Patil [this message]
2018-08-10 12:57 ` [LTP] [PATCH] tracing: ftrace_lib: check if tracing_max_latency exists Cyril Hrubis
2018-08-13 15:46   ` Sandeep Patil
2018-08-13 15:48     ` Cyril Hrubis

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=20180808234019.241238-1-sspatil@google.com \
    --to=sspatil@google.com \
    --cc=ltp@lists.linux.it \
    /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.