mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Masami Hiramatsu <mhiramat@kernel.org>
To: Steven Rostedt <rostedt@goodmis.org>, Shuah Khan <shuahkhan@gmail.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>,
	Shuah Khan <shuah@kernel.org>,
	linux-kernel@vger.kernel.org, Ingo Molnar <mingo@redhat.com>,
	Namhyung Kim <namhyung@kernel.org>,
	Tom Zanussi <tom.zanussi@linux.intel.com>,
	linux-kselftest@vger.kernel.org
Subject: [PATCH -tip v3 3/9] selftests: ftrace: Add --quiet option not to show error logs on screen
Date: Wed, 16 Nov 2016 17:13:17 +0900	[thread overview]
Message-ID: <147928399712.22982.8284640390982775052.stgit@devbox> (raw)
In-Reply-To: <147928393441.22982.15432364313721641355.stgit@devbox>

Since the verbose error logs scrolls out previous test results
--quiet option suppress to show such message.

e.g.
 # ./ftracetest -q
=== Ftrace unit tests ===
[1] Basic trace file check	[PASS]
[2] Basic test for tracers	[PASS]
[3] Basic trace clock test	[PASS]
[4] Basic event tracing check	[PASS]
[5] event tracing - enable/disable with event level files	[PASS]
[6] event tracing - restricts events based on pid	[PASS]
[7] event tracing - enable/disable with subsystem level files	[PASS]
[8] event tracing - enable/disable with top level files	[PASS]
[9] ftrace - function graph filters with stack tracer	[UNSUPPORTED]
[10] ftrace - function graph filters	[UNSUPPORTED]
[11] ftrace - function profiler with function tracing	[UNSUPPORTED]
[12] Test creation and deletion of trace instances while setting an event
	[PASS]
[13] Test creation and deletion of trace instances	[PASS]
[14] Kprobe dynamic event - adding and removing	[UNSUPPORTED]
[15] Kprobe dynamic event - busy event check	[UNSUPPORTED]
[16] Kprobe dynamic event with arguments	[UNSUPPORTED]
[17] Kprobe dynamic event with function tracer	[UNSUPPORTED]
[18] Kretprobe dynamic event with arguments	[UNSUPPORTED]
[19] event trigger - test event enable/disable trigger	[PASS]
[20] event trigger - test trigger filter	[PASS]
[21] event trigger - test histogram modifiers	[UNSUPPORTED]
[22] event trigger - test histogram trigger	[UNSUPPORTED]
[23] event trigger - test multiple histogram triggers	[UNSUPPORTED]
[24] event trigger - test snapshot-trigger	[FAIL]
[25] event trigger - test stacktrace-trigger	[PASS]
[26] event trigger - test traceon/off trigger	[PASS]

# of passed:  14
# of failed:  1
# of unresolved:  0
# of untested:  0
# of unsupported:  11
# of xfailed:  0
# of undefined(test bug):  0

Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
---
 tools/testing/selftests/ftrace/ftracetest |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/ftrace/ftracetest b/tools/testing/selftests/ftrace/ftracetest
index a03d366..d08235f 100755
--- a/tools/testing/selftests/ftrace/ftracetest
+++ b/tools/testing/selftests/ftrace/ftracetest
@@ -14,6 +14,7 @@ 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 "		-d|--debug Debug mode (trace all shell commands)"
 exit $1
 }
@@ -58,6 +59,10 @@ parse_opts() { # opts
       VERBOSE=1
       shift 1
     ;;
+    --quiet|-q)
+      BE_QUIET=1
+      shift 1
+    ;;
     --debug|-d)
       DEBUG=1
       shift 1
@@ -101,6 +106,7 @@ 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 $*
 
@@ -249,7 +255,7 @@ run_test() { # testfile
     # Remove test log if the test was done as it was expected.
     [ $KEEP_LOG -eq 0 ] && rm $testlog
   else
-    catlog $testlog
+    [ $BE_QUIET -eq 0 ] && catlog $testlog
     TOTAL_RESULT=1
   fi
 }

  parent reply	other threads:[~2016-11-16  8:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-16  8:12 [PATCH -tip v3 0/9] ftrace: selftests: Add full glob matching and update ftracetest Masami Hiramatsu
2016-11-16  8:12 ` [PATCH -tip v3 1/9] ftrace: Support full glob matching Masami Hiramatsu
2016-11-16 11:17   ` Masami Hiramatsu
2016-11-16  8:13 ` [PATCH -tip v3 2/9] selftests: ftrace: Initialize ftrace before each test Masami Hiramatsu
2016-11-16  8:13 ` Masami Hiramatsu [this message]
2016-11-22 19:44   ` [PATCH -tip v3 3/9] selftests: ftrace: Add --quiet option not to show error logs on screen Steven Rostedt
2016-11-25  0:04     ` Masami Hiramatsu
2016-11-16  8:13 ` [PATCH -tip v3 4/9] selftests: ftrace: Check whether snapshot trigger is supported correctly Masami Hiramatsu
2016-11-16  8:13 ` [PATCH -tip v3 5/9] selftests: ftrace: Fix trigger-mod to run without syscall trace Masami Hiramatsu
2016-11-16  8:14 ` [PATCH -tip v3 6/9] selftests: ftrace: Hide ftracetest logs from git Masami Hiramatsu
2016-11-16  8:14 ` [PATCH -tip v3 7/9] selftests: ftrace: Introduce TMPDIR for temporary files Masami Hiramatsu
2016-11-16  8:14 ` [PATCH -tip v3 8/9] selftests: ftrace: Add a testcase for function filter glob match Masami Hiramatsu
2016-11-16  8:14 ` [PATCH -tip v3 9/9] selftests: ftrace: Add a testcase for types of kprobe event Masami Hiramatsu

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=147928399712.22982.8284640390982775052.stgit@devbox \
    --to=mhiramat@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=shuah@kernel.org \
    --cc=shuahkhan@gmail.com \
    --cc=tom.zanussi@linux.intel.com \
    /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

Powered by JetHome