diff options
author | Steven Rostedt <srostedt@redhat.com> | 2012-07-30 14:30:53 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2012-07-30 14:33:55 -0400 |
commit | 9b1d367dbbeb6646f04a8865ecc2bc454f7dd88f (patch) | |
tree | 0c31af9d0b9b0a03c6c59901e2940f3d99c1eda2 /tools | |
parent | c1434dcc57f97b0e533dedb8814a76ef13e702b4 (diff) |
ktest: Ignore errors it tests if IGNORE_ERRORS is set
The option IGNORE_ERRORS is used to allow a test to succeed even if a
warning appears from the kernel. Sometimes kernels will produce warnings
that are not associated with a test, and the user wants to test
something else.
The IGNORE_ERRORS works for boot up, but was not preventing test runs to
succeed if the kernel produced a warning.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/testing/ktest/ktest.pl | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl index c444c4fcc8c4..a022fb7d113d 100755 --- a/tools/testing/ktest/ktest.pl +++ b/tools/testing/ktest/ktest.pl | |||
@@ -2074,6 +2074,7 @@ sub do_run_test { | |||
2074 | my $line; | 2074 | my $line; |
2075 | my $full_line; | 2075 | my $full_line; |
2076 | my $bug = 0; | 2076 | my $bug = 0; |
2077 | my $bug_ignored = 0; | ||
2077 | 2078 | ||
2078 | wait_for_monitor 1; | 2079 | wait_for_monitor 1; |
2079 | 2080 | ||
@@ -2098,7 +2099,11 @@ sub do_run_test { | |||
2098 | doprint $line; | 2099 | doprint $line; |
2099 | 2100 | ||
2100 | if ($full_line =~ /call trace:/i) { | 2101 | if ($full_line =~ /call trace:/i) { |
2101 | $bug = 1; | 2102 | if ($ignore_errors) { |
2103 | $bug_ignored = 1; | ||
2104 | } else { | ||
2105 | $bug = 1; | ||
2106 | } | ||
2102 | } | 2107 | } |
2103 | 2108 | ||
2104 | if ($full_line =~ /Kernel panic -/) { | 2109 | if ($full_line =~ /Kernel panic -/) { |
@@ -2111,6 +2116,10 @@ sub do_run_test { | |||
2111 | } | 2116 | } |
2112 | } while (!$child_done && !$bug); | 2117 | } while (!$child_done && !$bug); |
2113 | 2118 | ||
2119 | if (!$bug && $bug_ignored) { | ||
2120 | doprint "WARNING: Call Trace detected but ignored due to IGNORE_ERRORS=1\n"; | ||
2121 | } | ||
2122 | |||
2114 | if ($bug) { | 2123 | if ($bug) { |
2115 | my $failure_start = time; | 2124 | my $failure_start = time; |
2116 | my $now; | 2125 | my $now; |