system_reset_bootable: Use fractional random sleeps
system_reset_bootable picks random times to sleep for between
reboot iterations.
Prior to this patch it used integers, and so always waited for
whole numbers of seconds. This causes a problem where there's
a sub-second failure window during which a reboot would fail.
Depending on the system, qemu version and luck, the window could
completely miss the failure (reliably), and a small change
(such as a slightly different qemu build or host system) could
move the failure window within a second-boundary that would be caught.
This results in blaming the change rather than the original
fault.
Solve this by moving to random fractional values, at millisecond
resolution; there's probably more than a ms slop in the system
anyway.
Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
Showing
想要评论请 注册 或 登录