aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xtools/testing/ktest/ktest.pl11
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
index aa442a9075db..1e1fe835df48 100755
--- a/tools/testing/ktest/ktest.pl
+++ b/tools/testing/ktest/ktest.pl
@@ -851,7 +851,16 @@ sub monitor {
851 851
852 while (!$done) { 852 while (!$done) {
853 853
854 if ($booted) { 854 if ($bug && defined($stop_after_failure) &&
855 $stop_after_failure >= 0) {
856 my $time = $stop_after_failure - (time - $failure_start);
857 $line = wait_for_input($monitor_fp, $time);
858 if (!defined($line)) {
859 doprint "bug timed out after $booted_timeout seconds\n";
860 doprint "Test forced to stop after $stop_after_failure seconds after failure\n";
861 last;
862 }
863 } elsif ($booted) {
855 $line = wait_for_input($monitor_fp, $booted_timeout); 864 $line = wait_for_input($monitor_fp, $booted_timeout);
856 if (!defined($line)) { 865 if (!defined($line)) {
857 my $s = $booted_timeout == 1 ? "" : "s"; 866 my $s = $booted_timeout == 1 ? "" : "s";