aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/testing/ktest/ktest.pl14
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
index 125ab94e7294..8bbfceedfdb2 100755
--- a/tools/testing/ktest/ktest.pl
+++ b/tools/testing/ktest/ktest.pl
@@ -1110,6 +1110,7 @@ sub do_run_test {
1110 1110
1111 # we are not guaranteed to get a full line 1111 # we are not guaranteed to get a full line
1112 $full_line .= $line; 1112 $full_line .= $line;
1113 doprint $line;
1113 1114
1114 if ($full_line =~ /call trace:/i) { 1115 if ($full_line =~ /call trace:/i) {
1115 $bug = 1; 1116 $bug = 1;
@@ -1126,6 +1127,19 @@ sub do_run_test {
1126 } while (!$child_done && !$bug); 1127 } while (!$child_done && !$bug);
1127 1128
1128 if ($bug) { 1129 if ($bug) {
1130 my $failure_start = time;
1131 my $now;
1132 do {
1133 $line = wait_for_input($monitor_fp, 1);
1134 if (defined($line)) {
1135 doprint $line;
1136 }
1137 $now = time;
1138 if ($now - $failure_start >= $stop_after_failure) {
1139 last;
1140 }
1141 } while (defined($line));
1142
1129 doprint "Detected kernel crash!\n"; 1143 doprint "Detected kernel crash!\n";
1130 # kill the child with extreme prejudice 1144 # kill the child with extreme prejudice
1131 kill 9, $child_pid; 1145 kill 9, $child_pid;