mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
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:
10
Cargo.lock
generated
10
Cargo.lock
generated
@@ -234,6 +234,7 @@ dependencies = [
|
||||
"vhost_user_net",
|
||||
"vmm",
|
||||
"vmm-sys-util",
|
||||
"wait-timeout",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1676,6 +1677,15 @@ dependencies = [
|
||||
"serde_derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wait-timeout"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6"
|
||||
dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasi"
|
||||
version = "0.9.0+wasi-snapshot-preview1"
|
||||
|
||||
Reference in New Issue
Block a user