From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Masami Hiramatsu <mhiramat@kernel.org>
Subject: [for-next][PATCH 5/5] selftests: ftrace: Shift down default message verbosity
Date: Tue, 13 Dec 2016 11:14:13 -0500 [thread overview]
Message-ID: <20161213161436.344763932@goodmis.org> (raw)
In-Reply-To: 20161213161408.374215860@goodmis.org
[-- Attachment #1: 0005-selftests-ftrace-Shift-down-default-message-verbosit.patch --]
[-- Type: text/plain, Size: 2522 bytes --]
From: Masami Hiramatsu <mhiramat@kernel.org>
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
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
tools/testing/selftests/ftrace/ftracetest | 18 +++++++-----------
1 file 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)]"
echo " Options:"
echo " -h|--help Show help message"
echo " -k|--keep Keep passed test logs"
-echo " -v|--verbose Show all stdout messages in testcases"
-echo " -q|--quiet Do not show error log on stdout"
+echo " -v|--verbose Increase verbosity of test messages"
+echo " -vv Alias of -v -v (Show all results in stdout)"
echo " -d|--debug Debug mode (trace all shell commands)"
exit $1
}
@@ -55,12 +55,9 @@ parse_opts() { # opts
KEEP_LOG=1
shift 1
;;
- --verbose|-v)
- VERBOSE=1
- shift 1
- ;;
- --quiet|-q)
- BE_QUIET=1
+ --verbose|-v|-vv)
+ VERBOSE=$((VERBOSE + 1))
+ [ $1 == '-vv' ] && VERBOSE=$((VERBOSE + 1))
shift 1
;;
--debug|-d)
@@ -106,7 +103,6 @@ LOG_DIR=$TOP_DIR/logs/`date +%Y%m%d-%H%M%S`/
KEEP_LOG=0
DEBUG=0
VERBOSE=0
-BE_QUIET=0
# Parse command-line options
parse_opts $*
@@ -246,7 +242,7 @@ run_test() { # testfile
testcase $1
echo "execute: "$1 > $testlog
SIG_RESULT=0
- if [ $VERBOSE -ne 0 ]; then
+ if [ $VERBOSE -ge 2 ]; then
__run_test $1 2>> $testlog | tee -a $testlog
else
__run_test $1 >> $testlog 2>&1
@@ -256,7 +252,7 @@ run_test() { # testfile
# Remove test log if the test was done as it was expected.
[ $KEEP_LOG -eq 0 ] && rm $testlog
else
- [ $BE_QUIET -eq 0 ] && catlog $testlog
+ [ $VERBOSE -ge 1 ] && catlog $testlog
TOTAL_RESULT=1
fi
rm -rf $TMPDIR
--
2.10.2
next prev parent reply other threads:[~2016-12-13 16:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-13 16:14 [for-next][PATCH 0/5] tracing: Hopefully last update for merge window Steven Rostedt
2016-12-13 16:14 ` [for-next][PATCH 1/5] tracing: Use SOFTIRQ_OFFSET for softirq dectection for more accurate results Steven Rostedt
2016-12-13 16:14 ` [for-next][PATCH 2/5] tracing/rb: Init the CPU mask on allocation Steven Rostedt
2016-12-13 16:14 ` [for-next][PATCH 3/5] tracing/kprobes: Add a helper method to return number of probe hits Steven Rostedt
2016-12-13 16:14 ` [for-next][PATCH 4/5] kprobes/trace: Fix kprobe selftest for newer gcc Steven Rostedt
2016-12-13 16:14 ` Steven Rostedt [this message]
2016-12-13 16:30 ` [for-next][PATCH 5/5] selftests: ftrace: Shift down default message verbosity Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161213161436.344763932@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=mingo@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox