* [LTP] [PATCH] tracing: ftrace_lib: check if tracing_max_latency exists.
@ 2018-08-08 23:40 Sandeep Patil
2018-08-10 12:57 ` Cyril Hrubis
0 siblings, 1 reply; 4+ messages in thread
From: Sandeep Patil @ 2018-08-08 23:40 UTC (permalink / raw)
To: ltp
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [LTP] [PATCH] tracing: ftrace_lib: check if tracing_max_latency exists.
2018-08-08 23:40 [LTP] [PATCH] tracing: ftrace_lib: check if tracing_max_latency exists Sandeep Patil
@ 2018-08-10 12:57 ` Cyril Hrubis
2018-08-13 15:46 ` Sandeep Patil
0 siblings, 1 reply; 4+ messages in thread
From: Cyril Hrubis @ 2018-08-10 12:57 UTC (permalink / raw)
To: ltp
Hi!
> 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
I guess that we can remove the 2> /dev/null that I suppose was supposed
to silence the error. Does it work okay for you without the redirection?
--
Cyril Hrubis
chrubis@suse.cz
^ permalink raw reply [flat|nested] 4+ messages in thread
* [LTP] [PATCH] tracing: ftrace_lib: check if tracing_max_latency exists.
2018-08-10 12:57 ` Cyril Hrubis
@ 2018-08-13 15:46 ` Sandeep Patil
2018-08-13 15:48 ` Cyril Hrubis
0 siblings, 1 reply; 4+ messages in thread
From: Sandeep Patil @ 2018-08-13 15:46 UTC (permalink / raw)
To: ltp
On Fri, Aug 10, 2018 at 02:57:41PM +0200, Cyril Hrubis wrote:
> Hi!
> > 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
>
> I guess that we can remove the 2> /dev/null that I suppose was supposed
> to silence the error. Does it work okay for you without the redirection?
Yes, just tested it. Works for me. Want me to send the patch removing it?
- ssp
>
> --
> Cyril Hrubis
> chrubis@suse.cz
^ permalink raw reply [flat|nested] 4+ messages in thread
* [LTP] [PATCH] tracing: ftrace_lib: check if tracing_max_latency exists.
2018-08-13 15:46 ` Sandeep Patil
@ 2018-08-13 15:48 ` Cyril Hrubis
0 siblings, 0 replies; 4+ messages in thread
From: Cyril Hrubis @ 2018-08-13 15:48 UTC (permalink / raw)
To: ltp
Hi!
> > I guess that we can remove the 2> /dev/null that I suppose was supposed
> > to silence the error. Does it work okay for you without the redirection?
>
> Yes, just tested it. Works for me. Want me to send the patch removing it?
No need, I will edit the patch you send before applying.
--
Cyril Hrubis
chrubis@suse.cz
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-08-13 15:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-08 23:40 [LTP] [PATCH] tracing: ftrace_lib: check if tracing_max_latency exists Sandeep Patil
2018-08-10 12:57 ` Cyril Hrubis
2018-08-13 15:46 ` Sandeep Patil
2018-08-13 15:48 ` Cyril Hrubis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox