On Feb 21, 2011, at 10:55 PM, Han Pingtian wrote:
> On older kernel, we should use "echo -1 > ..." to disable
> set_ftrace_pid, but on the latest kernel we must use
> "echo > ..." to disable it. So we have to try both methods
> for disabling it in ftrace stress test.
>
> Signed-off-by: Han Pingtian <[email protected]>
> ---
> .../ftrace_stress/ftrace_set_ftrace_pid.sh | 8 +++++++-
> 1 files changed, 7 insertions(+), 1 deletions(-)
>
> diff --git
> a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_set_ftrace_pid.sh
>
> b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_set_ftrace_pid.sh
> index 541215c..2ab6cf2 100755
> ---
> a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_set_ftrace_pid.sh
> +++
> b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_set_ftrace_pid.sh
> @@ -36,7 +36,13 @@ for ((; ; ))
> eval echo $str >> "$TRACING_PATH"/set_ftrace_pid
> }
>
> - echo > "$TRACING_PATH"/set_ftrace_pid
> + if ! echo > "$TRACING_PATH"/set_ftrace_pid >/dev/null 2>&1; then
> + echo -1 > "$TRACING_PATH"/set_ftrace_pid >/dev/null
> 2>&1
> +
> + if [ $? -ne 0 ]; then
> + tst_resm TBROK "Cannot disable set_ftrace_pid!"
Unlike the C APIs, this will never exit. Yes, I realize this is dumb.
Thanks,
-Garrett
------------------------------------------------------------------------------
Index, Search & Analyze Logs and other IT data in Real-Time with Splunk
Collect, index and harness all the fast moving IT data generated by your
applications, servers and devices whether physical, virtual or in the cloud.
Deliver compliance at lower cost and gain new business insights.
Free Software Download: http://p.sf.net/sfu/splunk-dev2dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list