diff options
| -rwxr-xr-x | tools/testing/ktest/ktest.pl | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl index d10fff12bc24..c8a42d5991be 100755 --- a/tools/testing/ktest/ktest.pl +++ b/tools/testing/ktest/ktest.pl | |||
| @@ -1138,6 +1138,7 @@ sub reboot { | |||
| 1138 | if (defined($time)) { | 1138 | if (defined($time)) { |
| 1139 | if (wait_for_monitor($time, $reboot_success_line)) { | 1139 | if (wait_for_monitor($time, $reboot_success_line)) { |
| 1140 | # reboot got stuck? | 1140 | # reboot got stuck? |
| 1141 | doprint "Reboot did not finish. Forcing power cycle\n"; | ||
| 1141 | run_command "$power_cycle"; | 1142 | run_command "$power_cycle"; |
| 1142 | } | 1143 | } |
| 1143 | end_monitor; | 1144 | end_monitor; |
| @@ -1235,6 +1236,9 @@ sub wait_for_monitor { | |||
| 1235 | my $line; | 1236 | my $line; |
| 1236 | my $booted = 0; | 1237 | my $booted = 0; |
| 1237 | my $start_time = time; | 1238 | my $start_time = time; |
| 1239 | my $skip_call_trace = 0; | ||
| 1240 | my $bug = 0; | ||
| 1241 | my $bug_ignored = 0; | ||
| 1238 | my $now; | 1242 | my $now; |
| 1239 | 1243 | ||
| 1240 | doprint "** Wait for monitor to settle down **\n"; | 1244 | doprint "** Wait for monitor to settle down **\n"; |
| @@ -1251,6 +1255,28 @@ sub wait_for_monitor { | |||
| 1251 | $booted = 1; | 1255 | $booted = 1; |
| 1252 | } | 1256 | } |
| 1253 | 1257 | ||
| 1258 | if ($full_line =~ /\[ backtrace testing \]/) { | ||
| 1259 | $skip_call_trace = 1; | ||
| 1260 | } | ||
| 1261 | |||
| 1262 | if ($full_line =~ /call trace:/i) { | ||
| 1263 | if (!$bug && !$skip_call_trace) { | ||
| 1264 | if ($ignore_errors) { | ||
| 1265 | $bug_ignored = 1; | ||
| 1266 | } else { | ||
| 1267 | $bug = 1; | ||
| 1268 | } | ||
| 1269 | } | ||
| 1270 | } | ||
| 1271 | |||
| 1272 | if ($full_line =~ /\[ end of backtrace testing \]/) { | ||
| 1273 | $skip_call_trace = 0; | ||
| 1274 | } | ||
| 1275 | |||
| 1276 | if ($full_line =~ /Kernel panic -/) { | ||
| 1277 | $bug = 1; | ||
| 1278 | } | ||
| 1279 | |||
| 1254 | if ($line =~ /\n/) { | 1280 | if ($line =~ /\n/) { |
| 1255 | $full_line = ""; | 1281 | $full_line = ""; |
| 1256 | } | 1282 | } |
| @@ -1261,7 +1287,7 @@ sub wait_for_monitor { | |||
| 1261 | } | 1287 | } |
| 1262 | } | 1288 | } |
| 1263 | print "** Monitor flushed **\n"; | 1289 | print "** Monitor flushed **\n"; |
| 1264 | return 0; | 1290 | return $bug; |
| 1265 | } | 1291 | } |
| 1266 | 1292 | ||
| 1267 | sub save_logs { | 1293 | sub save_logs { |
