tests: Wait explicitly for vm shutdown w/ the 'wait-timeout' crate

Instead of waiting blindly with fixed amount of sleeping time, we can
use the `wait-timeout` crate to explicitly wait VM shutdown (with a
timeout). It can reduces the execution time of some tests
substantially. Also, this patch increases the `shutdown` timeout for
'test_reboot', which should fix the recent sporadic failures on this
test.

Signed-off-by: Bo Chen <chen.bo@intel.com>
This commit is contained in:
Bo Chen
2020-10-28 16:40:50 -07:00
committed by Rob Bradford
parent cd1c2ed31e
commit 26783fea89
3 changed files with 18 additions and 6 deletions

View File

@@ -28,6 +28,7 @@ vhost_user_block = { path = "vhost_user_block"}
vhost_user_net = { path = "vhost_user_net"}
vmm = { path = "vmm" }
vmm-sys-util = "0.6.1"
wait-timeout = "0.2.0"
[build-dependencies]
clap = { version = "2.33.3", features = ["wrap_help"] }