From f2713788115ae3caa502152f3e7c453cc8cd611c Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Wed, 18 Nov 2020 10:35:10 +0000 Subject: [PATCH] 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 --- tests/integration.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration.rs b/tests/integration.rs index ea06fe494..890d36292 100644 --- a/tests/integration.rs +++ b/tests/integration.rs @@ -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