(2014/09/04 10:41), Namhyung Kim wrote: > 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/ ?
Oops, right! I missed that. Since the $1 is same as $t, the test itself works, but it should be fixed. Thank you! > > 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 > -- Masami HIRAMATSU Software Platform Research Dept. Linux Technology Research Center Hitachi, Ltd., Yokohama Research Laboratory E-mail: masami.hiramatsu...@hitachi.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/