tracing: ftrace_lib: check if tracing_max_latency exists.
PATCH 1/1 tracing: ftrace_lib: check if tracing_max_latency exists.
This avoids unnecessary error in ftrace stress test when the kernel being tested does not have CONFIG_TRACER_MAX_TRACE defined.
--- testcases/kernel/tracing/ftrace_test/ftrace_lib.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
testcases/kernel/tracing/ftrace_test/ftrace_lib.sh +3 -1
@@ -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
Signature · 1 line
2.18.0.597.ga71716f1ad-goog
PATCH 1/1 tracing: ftrace_lib: check if tracing_max_latency exists.
Hi!
Quoted 13 lines
This avoids unnecessary error in ftrace stress test when the kernel being tested does not have
CONFIG_TRACER_MAX_TRACEdefined.Signed-off-by Sandeep Patil <[email protected]>--- testcases/kernel/tracing/ftrace_test/ftrace_lib.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)testcases/kernel/tracing/ftrace_test/ftrace_lib.sh +0
-0
testcases/kernel/tracing/ftrace_test/ftrace_lib.sh restore_old_setting() · line 105
Quoted 7 lines
testcases/kernel/tracing/ftrace_test/ftrace_lib.sh +3
-1@@ -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?
Signature · 2 lines
Cyril Hrubis [email protected]
PATCH 1/1 tracing: ftrace_lib: check if tracing_max_latency exists.
Quoted 15 lines · Cyril Hrubis
Hi!
Quoted 14 lines
This avoids unnecessary error in ftrace stress test when the kernel being tested does not have
CONFIG_TRACER_MAX_TRACEdefined.Signed-off-by Sandeep Patil <[email protected]>--- testcases/kernel/tracing/ftrace_test/ftrace_lib.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)testcases/kernel/tracing/ftrace_test/ftrace_lib.sh +0
-0@@ -100,7 +100,9 @@ restore_old_setting()
Quoted 9 lines
testcases/kernel/tracing/ftrace_test/ftrace_lib.sh restore_old_setting() · line 105
Quoted 6 lines
testcases/kernel/tracing/ftrace_test/ftrace_lib.sh +3
-1echo 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 + fiI guess that we can remove the 2>
/dev/nullthat 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
Quoted 4 lines
Signature · 3 lines
-- Cyril Hrubis [email protected]
PATCH 1/1 tracing: ftrace_lib: check if tracing_max_latency exists.
Hi!
Quoted 4 lines
Quoted 2 lines
I guess that we can remove the 2>
/dev/nullthat 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.
Signature · 2 lines
Cyril Hrubis [email protected]