From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sog-mx-1.v43.ch3.sourceforge.com ([172.29.43.191] helo=mx.sourceforge.net) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.74) (envelope-from ) id 1Prm5f-00036X-Vm for ltp-list@lists.sourceforge.net; Tue, 22 Feb 2011 06:51:19 +0000 Received: from mx1.redhat.com ([209.132.183.28]) by sog-mx-1.v43.ch3.sourceforge.com with esmtp (Exim 4.74) id 1Prm5e-0001lR-Pw for ltp-list@lists.sourceforge.net; Tue, 22 Feb 2011 06:51:19 +0000 Date: Tue, 22 Feb 2011 14:55:07 +0800 From: Han Pingtian Message-ID: <20110222065507.GA7689@hpt.nay.redhat.com> MIME-Version: 1.0 Content-Disposition: inline Subject: [LTP] [PATCH] try two methods to disable set_ftrace_pid List-Id: Linux Test Project General Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ltp-list-bounces@lists.sourceforge.net To: ltp-list@lists.sourceforge.net, Li Zefan 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 --- .../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!" + fi + fi } sleep 1 -- 1.7.1 ------------------------------------------------------------------------------ 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 Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list