[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87r3zs9n6m.fsf@sejong.aot.lge.com>
Date: Thu, 04 Sep 2014 10:41:53 +0900
From: Namhyung Kim <namhyung@...nel.org>
To: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
Cc: Shuah Khan <shuah.kh@...sung.com>,
Tom Zanussi <tom.zanussi@...ux.intel.com>,
Yoshihiro YUNOMAE <yoshihiro.yunomae.ez@...achi.com>,
Oleg Nesterov <oleg@...hat.com>,
Steven Rostedt <rostedt@...dmis.org>,
Ingo Molnar <mingo@...nel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [RFC PATCH v3 1/4] ftracetest: Initial commit for ftracetest
Hi Masami,
Just a nit..
On Tue, 02 Sep 2014 11:06:39 +0000, Masami Hiramatsu wrote:
> ftracetest is a collection of testcase shell-scripts for ftrace.
> To avoid regressions of ftrace, these testcases check correct
> ftrace behaviors. If someone would like to add any features on
> ftrace, the patch series should have at least one testcase for
> checking the new behavior.
[SNIP]
> +# Run one test case
> +run_test() { # testfile
> + local testname=`basename $1`
> + local testlog=`mktemp --tmpdir=$LOG_DIR ${testname}-XXXXXX.log`
> + testcase $1
> + echo "execute: "$1 > $testlog
> + (cd $TRACING_DIR; set -x ; . $t) >> $testlog 2>&1
s/$t/$1/ ?
Thanks,
Namhyung
> + ret=$?
> + if [ $ret -ne 0 ]; then
> + failed
> + catlog $testlog
> + else
> + passed
> + [ $KEEP_LOG -eq 0 ] && rm $testlog
> + fi
> +}
> +
> +# Main loop
> +for t in $TEST_CASES; do
> + run_test $t
> +done
> +prlog ""
> +prlog "# of passed: " `echo $PASSED_CASES | wc -w`
> +prlog "# of failed: " `echo $FAILED_CASES | wc -w`
> +
> +test -z "$FAILED_CASES" # if no error, return 0
> diff --git a/tools/testing/ftrace/test.d/template b/tools/testing/ftrace/test.d/template
> new file mode 100644
> index 0000000..ce5f735
> --- /dev/null
> +++ b/tools/testing/ftrace/test.d/template
> @@ -0,0 +1,4 @@
> +#!/bin/sh
> +# description: %HERE DESCRIBE WHAT THIS DOES%
> +# you have to add ".tc" extention for your testcase file
> +exit 0 # Return 0 if the test is passed, otherwise return !0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists