aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMasami Hiramatsu <mhiramat@kernel.org>2016-11-25 07:58:48 -0500
committerSteven Rostedt <rostedt@goodmis.org>2016-12-13 11:28:10 -0500
commit3dbb16b87b57bb1088044ad2a0432e4769075002 (patch)
tree2b4b00d3ff94025db6e749e8da24d606d2c5fc49 /tools
parentd4d7ccc834fe2401084e01fb043ad70ac410b19d (diff)
selftests: ftrace: Shift down default message verbosity
Shift down default message verbosity, where it does not show error results in stdout by default. Since that behavior is the same as giving the --quiet option, this patch removes --quiet and makes --verbose increasing verbosity. In other words, this changes verbosity options as below. ftracetest -q -> ftracetest ftracetest -> ftracetest -v ftracetest -v -> ftracetest -v -v (or -vv) Link: http://lkml.kernel.org/r/148007872763.5917.15256235993753860592.stgit@devbox Acked-by: Shuah Khan <shuahkh@osg.samsung.com> Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/testing/selftests/ftrace/ftracetest18
1 files changed, 7 insertions, 11 deletions
diff --git a/tools/testing/selftests/ftrace/ftracetest b/tools/testing/selftests/ftrace/ftracetest
index 685376b485a2..52e3c4df28d6 100755
--- a/tools/testing/selftests/ftrace/ftracetest
+++ b/tools/testing/selftests/ftrace/ftracetest
@@ -13,8 +13,8 @@ echo "Usage: ftracetest [options] [testcase(s)] [testcase-directory(s)]"
13echo " Options:" 13echo " Options:"
14echo " -h|--help Show help message" 14echo " -h|--help Show help message"
15echo " -k|--keep Keep passed test logs" 15echo " -k|--keep Keep passed test logs"
16echo " -v|--verbose Show all stdout messages in testcases" 16echo " -v|--verbose Increase verbosity of test messages"
17echo " -q|--quiet Do not show error log on stdout" 17echo " -vv Alias of -v -v (Show all results in stdout)"
18echo " -d|--debug Debug mode (trace all shell commands)" 18echo " -d|--debug Debug mode (trace all shell commands)"
19exit $1 19exit $1
20} 20}
@@ -55,12 +55,9 @@ parse_opts() { # opts
55 KEEP_LOG=1 55 KEEP_LOG=1
56 shift 1 56 shift 1
57 ;; 57 ;;
58 --verbose|-v) 58 --verbose|-v|-vv)
59 VERBOSE=1 59 VERBOSE=$((VERBOSE + 1))
60 shift 1 60 [ $1 == '-vv' ] && VERBOSE=$((VERBOSE + 1))
61 ;;
62 --quiet|-q)
63 BE_QUIET=1
64 shift 1 61 shift 1
65 ;; 62 ;;
66 --debug|-d) 63 --debug|-d)
@@ -106,7 +103,6 @@ LOG_DIR=$TOP_DIR/logs/`date +%Y%m%d-%H%M%S`/
106KEEP_LOG=0 103KEEP_LOG=0
107DEBUG=0 104DEBUG=0
108VERBOSE=0 105VERBOSE=0
109BE_QUIET=0
110# Parse command-line options 106# Parse command-line options
111parse_opts $* 107parse_opts $*
112 108
@@ -246,7 +242,7 @@ run_test() { # testfile
246 testcase $1 242 testcase $1
247 echo "execute: "$1 > $testlog 243 echo "execute: "$1 > $testlog
248 SIG_RESULT=0 244 SIG_RESULT=0
249 if [ $VERBOSE -ne 0 ]; then 245 if [ $VERBOSE -ge 2 ]; then
250 __run_test $1 2>> $testlog | tee -a $testlog 246 __run_test $1 2>> $testlog | tee -a $testlog
251 else 247 else
252 __run_test $1 >> $testlog 2>&1 248 __run_test $1 >> $testlog 2>&1
@@ -256,7 +252,7 @@ run_test() { # testfile
256 # Remove test log if the test was done as it was expected. 252 # Remove test log if the test was done as it was expected.
257 [ $KEEP_LOG -eq 0 ] && rm $testlog 253 [ $KEEP_LOG -eq 0 ] && rm $testlog
258 else 254 else
259 [ $BE_QUIET -eq 0 ] && catlog $testlog 255 [ $VERBOSE -ge 1 ] && catlog $testlog
260 TOTAL_RESULT=1 256 TOTAL_RESULT=1
261 fi 257 fi
262 rm -rf $TMPDIR 258 rm -rf $TMPDIR