diff options
author | Steven Rostedt <srostedt@redhat.com> | 2012-03-21 08:18:35 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2012-03-21 08:18:35 -0400 |
commit | 6ca996cc7cee88a6153158455a0ba8e1e79dcd2e (patch) | |
tree | a896e3d3a0f733f123a88a6f6594c14f4a69ed4e /tools | |
parent | 627977d83ad081c43c9bcd3ad1e89e816a752061 (diff) |
ktest: Add warning when bugs are ignored
When IGNORE_ERRORS is set, ktest will not fail a test if a backtrace
is detected. But this can be an issue if the user added it in the
config but forgot to remove it. They may be left wondering why their
test did not fail, or even worse, why their bisect gave the wrong
commit.
Add a warning in the output if IGNORE_WARNINGS is set, and ktest detects
a kernel error.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/testing/ktest/ktest.pl | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl index 2b63190c9f64..0a5f6cb007af 100755 --- a/tools/testing/ktest/ktest.pl +++ b/tools/testing/ktest/ktest.pl | |||
@@ -1460,6 +1460,7 @@ sub get_sha1 { | |||
1460 | sub monitor { | 1460 | sub monitor { |
1461 | my $booted = 0; | 1461 | my $booted = 0; |
1462 | my $bug = 0; | 1462 | my $bug = 0; |
1463 | my $bug_ignored = 0; | ||
1463 | my $skip_call_trace = 0; | 1464 | my $skip_call_trace = 0; |
1464 | my $loops; | 1465 | my $loops; |
1465 | 1466 | ||
@@ -1531,9 +1532,13 @@ sub monitor { | |||
1531 | } | 1532 | } |
1532 | 1533 | ||
1533 | if ($full_line =~ /call trace:/i) { | 1534 | if ($full_line =~ /call trace:/i) { |
1534 | if (!$ignore_errors && !$bug && !$skip_call_trace) { | 1535 | if (!$bug && !$skip_call_trace) { |
1535 | $bug = 1; | 1536 | if ($ignore_errors) { |
1536 | $failure_start = time; | 1537 | $bug_ignored = 1; |
1538 | } else { | ||
1539 | $bug = 1; | ||
1540 | $failure_start = time; | ||
1541 | } | ||
1537 | } | 1542 | } |
1538 | } | 1543 | } |
1539 | 1544 | ||
@@ -1595,6 +1600,10 @@ sub monitor { | |||
1595 | fail "failed - never got a boot prompt." and return 0; | 1600 | fail "failed - never got a boot prompt." and return 0; |
1596 | } | 1601 | } |
1597 | 1602 | ||
1603 | if ($bug_ignored) { | ||
1604 | doprint "WARNING: Call Trace detected but ignored due to IGNORE_ERRORS=1\n"; | ||
1605 | } | ||
1606 | |||
1598 | return 1; | 1607 | return 1; |
1599 | } | 1608 | } |
1600 | 1609 | ||