aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>2013-02-04 23:08:49 -0500
committerSteven Rostedt <rostedt@goodmis.org>2013-02-05 10:00:20 -0500
commitd6845536236a72382a20483887943a599d7c2b69 (patch)
tree62dcd9f02303412b89b92205d95c47dd6ed913a5 /tools
parent4283b169abfb0380850b56287ee644697ecf321a (diff)
ktest: Search for linux banner for successful reboot
Sometimes when a test kernel passed fine, but on reboot it crashed, ktest could get stuck and not proceed. This would be frustrating if you let a test run overnight to find out the next morning that it was stuck on the first test. To fix this, I made reboot check for the REBOOT_SUCCESS_LINE. If the line was not detected, then it would power cycle the box. What it didn't cover was if the REBOOT_SUCCESS_LINE wasn't defined or if a 'good' kernel did not display the line. Instead have it search for the Linux banner "Linux version". The reboot just needs to get to the start of the next kernel, it does not need to test if the next kernel makes it to a boot prompt. After we find the next kernel has booted, then we just wait for either the REBOOT_SUCCESS_LINE to appear or the timeout. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/testing/ktest/ktest.pl7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
index 3fd768e65998..839989d08dc2 100755
--- a/tools/testing/ktest/ktest.pl
+++ b/tools/testing/ktest/ktest.pl
@@ -1212,11 +1212,16 @@ sub reboot {
1212 } 1212 }
1213 1213
1214 if (defined($time)) { 1214 if (defined($time)) {
1215 if (wait_for_monitor($time, $reboot_success_line)) { 1215 # Look for the good kernel to boot
1216 if (wait_for_monitor($time, "Linux version")) {
1216 # reboot got stuck? 1217 # reboot got stuck?
1217 doprint "Reboot did not finish. Forcing power cycle\n"; 1218 doprint "Reboot did not finish. Forcing power cycle\n";
1218 run_command "$power_cycle"; 1219 run_command "$power_cycle";
1219 } 1220 }
1221
1222 # Still need to wait for the reboot to finish
1223 wait_for_monitor($time, $reboot_success_line);
1224
1220 end_monitor; 1225 end_monitor;
1221 } 1226 }
1222} 1227}