lkml.org 
[lkml]   [2011]   [Jul]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH 01/19] ktest: Notify reason to break out of monitoring boot
    From: Steven Rostedt <srostedt@redhat.com>

    Different timeouts can cause the ktest monitor to break out of the
    loop. It becomes annoying that one does not know the reason why
    it exited the monitor loop. Display the cause of the reason why
    the loop was exited.

    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
    ---
    tools/testing/ktest/ktest.pl | 12 ++++++++++--
    1 files changed, 10 insertions(+), 2 deletions(-)

    diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
    index cef28e6..b96d381 100755
    --- a/tools/testing/ktest/ktest.pl
    +++ b/tools/testing/ktest/ktest.pl
    @@ -841,12 +841,20 @@ sub monitor {

    if ($booted) {
    $line = wait_for_input($monitor_fp, $booted_timeout);
    + if (!defined($line)) {
    + my $s = $booted_timeout == 1 ? "" : "s";
    + doprint "Successful boot found: break after $booted_timeout second$s\n";
    + last;
    + }
    } else {
    $line = wait_for_input($monitor_fp);
    + if (!defined($line)) {
    + my $s = $timeout == 1 ? "" : "s";
    + doprint "Timed out after $timeout second$s\n";
    + last;
    + }
    }

    - last if (!defined($line));
    -
    doprint $line;
    print DMESG $line;

    --
    1.7.5.4



    \
     
     \ /
      Last update: 2011-07-26 03:27    [W:0.031 / U:1.704 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site