diff options
author | Steven Rostedt <srostedt@redhat.com> | 2011-06-13 10:26:27 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2011-06-13 10:26:27 -0400 |
commit | cd4f1d536c2b2221d5a80399698d39717bf40077 (patch) | |
tree | f059efc7723440d6b467baa1f0c11de159172343 /tools | |
parent | 59c5f46fbe01a00eedf54a23789634438bb80603 (diff) |
ktest: Notify reason to break out of monitoring boot
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>
Diffstat (limited to 'tools')
-rwxr-xr-x | 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 cef28e6632b9..b96d3819c42e 100755 --- a/tools/testing/ktest/ktest.pl +++ b/tools/testing/ktest/ktest.pl | |||
@@ -841,12 +841,20 @@ sub monitor { | |||
841 | 841 | ||
842 | if ($booted) { | 842 | if ($booted) { |
843 | $line = wait_for_input($monitor_fp, $booted_timeout); | 843 | $line = wait_for_input($monitor_fp, $booted_timeout); |
844 | if (!defined($line)) { | ||
845 | my $s = $booted_timeout == 1 ? "" : "s"; | ||
846 | doprint "Successful boot found: break after $booted_timeout second$s\n"; | ||
847 | last; | ||
848 | } | ||
844 | } else { | 849 | } else { |
845 | $line = wait_for_input($monitor_fp); | 850 | $line = wait_for_input($monitor_fp); |
851 | if (!defined($line)) { | ||
852 | my $s = $timeout == 1 ? "" : "s"; | ||
853 | doprint "Timed out after $timeout second$s\n"; | ||
854 | last; | ||
855 | } | ||
846 | } | 856 | } |
847 | 857 | ||
848 | last if (!defined($line)); | ||
849 | |||
850 | doprint $line; | 858 | doprint $line; |
851 | print DMESG $line; | 859 | print DMESG $line; |
852 | 860 | ||