Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: mhiramat at kernel.org (Masami Hiramatsu)
Subject: [PATCH 02/25] selftests/ftrace: Add --stop-fail hidden option for debug
Date: Fri, 27 Jul 2018 21:10:54 +0900	[thread overview]
Message-ID: <153269345407.3084.11498352613507079445.stgit@devbox> (raw)
In-Reply-To: <153269339575.3084.16279591141931053689.stgit@devbox>

Add --stop-fail option for debugging the ftracetest.

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

diff --git a/tools/testing/selftests/ftrace/ftracetest b/tools/testing/selftests/ftrace/ftracetest
index f9a9d424c980..c9c7fa8dc440 100755
--- a/tools/testing/selftests/ftrace/ftracetest
+++ b/tools/testing/selftests/ftrace/ftracetest
@@ -69,6 +69,10 @@ parse_opts() { # opts
       DEBUG=1
       shift 1
     ;;
+    --stop-fail)
+      STOP_FAILURE=1
+      shift 1
+    ;;
     --fail-unsupported)
       UNSUPPORTED_RESULT=1
       shift 1
@@ -117,6 +121,7 @@ KEEP_LOG=0
 DEBUG=0
 VERBOSE=0
 UNSUPPORTED_RESULT=0
+STOP_FAILURE=0
 # Parse command-line options
 parse_opts $*
 
@@ -304,6 +309,10 @@ run_test() { # testfile
 # Main loop
 for t in $TEST_CASES; do
   run_test $t
+  if [ $STOP_FAILURE -ne 0 -a $TOTAL_RESULT -ne 0 ]; then
+    echo "A failure detected. Stop test."
+    exit 1
+  fi
 done
 
 # Test on instance loop
@@ -315,6 +324,10 @@ for t in $TEST_CASES; do
   run_test $t
   rmdir $TRACING_DIR
   TRACING_DIR=$SAVED_TRACING_DIR
+  if [ $STOP_FAILURE -ne 0 -a $TOTAL_RESULT -ne 0 ]; then
+    echo "A failure detected. Stop test."
+    exit 1
+  fi
 done
 
 prlog ""

--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: mhiramat@kernel.org (Masami Hiramatsu)
Subject: [PATCH 02/25] selftests/ftrace: Add --stop-fail hidden option for debug
Date: Fri, 27 Jul 2018 21:10:54 +0900	[thread overview]
Message-ID: <153269345407.3084.11498352613507079445.stgit@devbox> (raw)
Message-ID: <20180727121054.46XQz8vB3FOhK6-RlJOCVvKi0NnOFjOTaxFo9u9CMxs@z> (raw)
In-Reply-To: <153269339575.3084.16279591141931053689.stgit@devbox>

Add --stop-fail option for debugging the ftracetest.

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

diff --git a/tools/testing/selftests/ftrace/ftracetest b/tools/testing/selftests/ftrace/ftracetest
index f9a9d424c980..c9c7fa8dc440 100755
--- a/tools/testing/selftests/ftrace/ftracetest
+++ b/tools/testing/selftests/ftrace/ftracetest
@@ -69,6 +69,10 @@ parse_opts() { # opts
       DEBUG=1
       shift 1
     ;;
+    --stop-fail)
+      STOP_FAILURE=1
+      shift 1
+    ;;
     --fail-unsupported)
       UNSUPPORTED_RESULT=1
       shift 1
@@ -117,6 +121,7 @@ KEEP_LOG=0
 DEBUG=0
 VERBOSE=0
 UNSUPPORTED_RESULT=0
+STOP_FAILURE=0
 # Parse command-line options
 parse_opts $*
 
@@ -304,6 +309,10 @@ run_test() { # testfile
 # Main loop
 for t in $TEST_CASES; do
   run_test $t
+  if [ $STOP_FAILURE -ne 0 -a $TOTAL_RESULT -ne 0 ]; then
+    echo "A failure detected. Stop test."
+    exit 1
+  fi
 done
 
 # Test on instance loop
@@ -315,6 +324,10 @@ for t in $TEST_CASES; do
   run_test $t
   rmdir $TRACING_DIR
   TRACING_DIR=$SAVED_TRACING_DIR
+  if [ $STOP_FAILURE -ne 0 -a $TOTAL_RESULT -ne 0 ]; then
+    echo "A failure detected. Stop test."
+    exit 1
+  fi
 done
 
 prlog ""

--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2018-07-27 12:10 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-27 12:09 [PATCH 00/25] selftests/ftrace: Improve ftracetest with coverage check mhiramat
2018-07-27 12:09 ` Masami Hiramatsu
2018-07-27 12:10 ` [PATCH 01/25] tracing: Allow gcov profiling on only ftrace subsystem mhiramat
2018-07-27 12:10   ` Masami Hiramatsu
2018-07-27 12:10 ` mhiramat [this message]
2018-07-27 12:10   ` [PATCH 02/25] selftests/ftrace: Add --stop-fail hidden option for debug Masami Hiramatsu
2018-07-27 12:11 ` [PATCH 03/25] selftests/ftrace: Add --console hidden option mhiramat
2018-07-27 12:11   ` Masami Hiramatsu
2018-07-27 12:11 ` [PATCH 04/25] selftests/ftrace: Add case number prefix to logfile mhiramat
2018-07-27 12:11   ` Masami Hiramatsu
2018-07-27 12:12 ` [PATCH 05/25] selftests/ftrace: More initialize features in initialize_ftrace mhiramat
2018-07-27 12:12   ` Masami Hiramatsu
2018-07-27 12:12 ` [PATCH 06/25] selftests/ftrace: Cleanup ftrace after running test mhiramat
2018-07-27 12:12   ` Masami Hiramatsu
2018-07-27 12:13 ` [PATCH 07/25] selftests/ftrace: Remove unneeded per-test init/cleanup ftrace mhiramat
2018-07-27 12:13   ` Masami Hiramatsu
2018-07-27 12:13 ` [PATCH 08/25] selftests/ftrace: Fix to test kprobe $comm arg only if available mhiramat
2018-07-27 12:13   ` Masami Hiramatsu
2018-07-27 12:14 ` [PATCH 09/25] selftests/ftrace: Fix checkbashisms errors mhiramat
2018-07-27 12:14   ` Masami Hiramatsu
2018-07-27 12:14 ` [PATCH 10/25] selftests/ftrace: Use loopback address instead of localhost mhiramat
2018-07-27 12:14   ` Masami Hiramatsu
2018-07-27 12:15 ` [PATCH 11/25] selftests/ftrace: Improve kprobe on module testcase to load/unload module mhiramat
2018-07-27 12:15   ` Masami Hiramatsu
2018-08-02  1:02   ` mhiramat
2018-08-02  1:02     ` Masami Hiramatsu
2018-08-02  7:22     ` mhiramat
2018-08-02  7:22       ` Masami Hiramatsu
2018-07-27 12:15 ` [PATCH 12/25] selftests/ftrace: Improve kprobe testcase to check log data mhiramat
2018-07-27 12:15   ` Masami Hiramatsu
2018-07-27 12:16 ` [PATCH 13/25] selftests/ftrace: Improve kretprobe " mhiramat
2018-07-27 12:16   ` Masami Hiramatsu
2018-07-27 12:16 ` [PATCH 14/25] selftests/ftrace: Test kprobe-event argument with various bitsize mhiramat
2018-07-27 12:16   ` Masami Hiramatsu
2018-07-27 12:17 ` [PATCH 15/25] selftests/ftrace: Check set_event_pid result mhiramat
2018-07-27 12:17   ` Masami Hiramatsu
2018-07-27 12:17 ` [PATCH 16/25] selftests/ftrace: Add kprobe event with $comm argument testcase mhiramat
2018-07-27 12:17   ` Masami Hiramatsu
2018-07-27 12:17 ` [PATCH 17/25] selftests/ftrace: Add kprobe profile testcase mhiramat
2018-07-27 12:17   ` Masami Hiramatsu
2018-07-27 12:18 ` [PATCH 18/25] selftests/ftrace: Add a testcase for nop tracer mhiramat
2018-07-27 12:18   ` Masami Hiramatsu
2018-07-27 12:18 ` [PATCH 19/25] selftests/ftrace: Add kprobe-event with symbol argument test mhiramat
2018-07-27 12:18   ` Masami Hiramatsu
2018-07-27 12:19 ` [PATCH 20/25] selftests/ftrace: Add trace_printk sample module test mhiramat
2018-07-27 12:19   ` Masami Hiramatsu
2018-07-27 12:19 ` [PATCH 21/25] selftests/ftrace: Add ringbuffer size changing testcase mhiramat
2018-07-27 12:19   ` Masami Hiramatsu
2018-07-27 12:20 ` [PATCH 22/25] selftests/ftrace: Add function profiling stat testcase mhiramat
2018-07-27 12:20   ` Masami Hiramatsu
2018-07-27 12:20 ` [PATCH 23/25] selftests/ftrace: Add max stack tracer testcase mhiramat
2018-07-27 12:20   ` Masami Hiramatsu
2018-08-03  5:24   ` mhiramat
2018-08-03  5:24     ` Masami Hiramatsu
2018-07-27 12:21 ` [PATCH 24/25] selftests/ftrace: Add function filter on module testcase mhiramat
2018-07-27 12:21   ` Masami Hiramatsu
2018-07-27 12:21 ` [PATCH 25/25] selftests/ftrace: Add trace_pipe testcase mhiramat
2018-07-27 12:21   ` 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=153269345407.3084.11498352613507079445.stgit@devbox \
    --to=linux-kselftest@vger.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