Skip to content

Commit

Permalink
ktest: Fix check for new kernel success on rebooting to good kernel
Browse files Browse the repository at this point in the history
The reboot function when rebooting back to a good kernel has a check
to make sure that a new kernel was indeed booted. But that check
uses a timeout value, which when calling the monitor will still
return success if the timeout is hit (no bug was found). It should
return an error to let the reboot code know that a new kernel was
not reached. Only the reboot code checks the return value of the
monitor.

Signed-off-by: Steven Rostedt <[email protected]>
  • Loading branch information
rostedt committed Oct 7, 2014
1 parent fee9d3e commit 995bc43
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tools/testing/ktest/ktest.pl
Original file line number Diff line number Diff line change
Expand Up @@ -1450,6 +1450,12 @@ sub wait_for_monitor {
}
}
print "** Monitor flushed **\n";

# if stop is defined but wasn't hit, return error
# used by reboot (which wants to see a reboot)
if (defined($stop) && !$booted) {
$bug = 1;
}
return $bug;
}

Expand Down

0 comments on commit 995bc43

Please sign in to comment.