tests: Wait for reboot in test_virtio_watchdog()

Aim to reduce flaky failures of this test by waiting for the VM to come
back after a reboot.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford 2020-11-18 10:35:10 +00:00 committed by Samuel Ortiz
parent 78b9edf848
commit f271378811

View File

@ -5467,7 +5467,7 @@ mod tests {
guest.ssh_command("screen -dmS reboot sh -c \"sleep 5; echo s | tee /proc/sysrq-trigger; echo c | sudo tee /proc/sysrq-trigger\"").unwrap();
// Allow some time for the watchdog to trigger (max 30s) and reboot to happen
thread::sleep(std::time::Duration::new(50, 0));
guest.wait_vm_boot(Some(50)).unwrap();
// Check that watchdog triggered reboot
let boot_count = guest