lkml.org 
[lkml]   [2012]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH 09/10] ktest: Ignore errors it tests if IGNORE_ERRORS is set
    From: Steven Rostedt <srostedt@redhat.com>

    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>
    ---
    tools/testing/ktest/ktest.pl | 11 ++++++++++-
    1 file changed, 10 insertions(+), 1 deletion(-)

    diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
    index c444c4f..a022fb7 100755
    --- a/tools/testing/ktest/ktest.pl
    +++ b/tools/testing/ktest/ktest.pl
    @@ -2074,6 +2074,7 @@ sub do_run_test {
    my $line;
    my $full_line;
    my $bug = 0;
    + my $bug_ignored = 0;

    wait_for_monitor 1;

    @@ -2098,7 +2099,11 @@ sub do_run_test {
    doprint $line;

    if ($full_line =~ /call trace:/i) {
    - $bug = 1;
    + if ($ignore_errors) {
    + $bug_ignored = 1;
    + } else {
    + $bug = 1;
    + }
    }

    if ($full_line =~ /Kernel panic -/) {
    @@ -2111,6 +2116,10 @@ sub do_run_test {
    }
    } while (!$child_done && !$bug);

    + if (!$bug && $bug_ignored) {
    + doprint "WARNING: Call Trace detected but ignored due to IGNORE_ERRORS=1\n";
    + }
    +
    if ($bug) {
    my $failure_start = time;
    my $now;
    --
    1.7.10.4

    [unhandled content-type:application/pgp-signature]
    \
     
     \ /
      Last update: 2012-07-30 23:41    [W:0.027 / U:30.356 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site