Commit 9b1d367d authored by Steven Rostedt's avatar Steven Rostedt Committed by Steven Rostedt

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: default avatarSteven Rostedt <rostedt@goodmis.org>
parent c1434dcc
...@@ -2074,6 +2074,7 @@ sub do_run_test { ...@@ -2074,6 +2074,7 @@ sub do_run_test {
my $line; my $line;
my $full_line; my $full_line;
my $bug = 0; my $bug = 0;
my $bug_ignored = 0;
wait_for_monitor 1; wait_for_monitor 1;
...@@ -2098,7 +2099,11 @@ sub do_run_test { ...@@ -2098,7 +2099,11 @@ sub do_run_test {
doprint $line; doprint $line;
if ($full_line =~ /call trace:/i) { if ($full_line =~ /call trace:/i) {
$bug = 1; if ($ignore_errors) {
$bug_ignored = 1;
} else {
$bug = 1;
}
} }
if ($full_line =~ /Kernel panic -/) { if ($full_line =~ /Kernel panic -/) {
...@@ -2111,6 +2116,10 @@ sub do_run_test { ...@@ -2111,6 +2116,10 @@ sub do_run_test {
} }
} while (!$child_done && !$bug); } while (!$child_done && !$bug);
if (!$bug && $bug_ignored) {
doprint "WARNING: Call Trace detected but ignored due to IGNORE_ERRORS=1\n";
}
if ($bug) { if ($bug) {
my $failure_start = time; my $failure_start = time;
my $now; my $now;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment