mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
tests: Stabilize VFIO NVIDIA memory hotplug check
Bump the wait_until timeout for the guest-visible memory growth in test_nvidia_card_memory_hotplug from 5s to 15s. The hot-add path inside the guest kernel can take longer than 5s particularly when using virtio-mem, which has been a source of flakes for this test. Drop the trailing assert!(guest.get_total_memory() > 5_760_000), as it is redundant. See: #8160 Signed-off-by: Bo Chen <bchen@crusoe.ai>
This commit is contained in:
@@ -10758,10 +10758,9 @@ mod vfio {
|
||||
// Add RAM to the VM
|
||||
let desired_ram = 6 << 30;
|
||||
resize_command(&api_socket, None, Some(desired_ram), None, None);
|
||||
assert!(wait_until(Duration::from_secs(5), || {
|
||||
assert!(wait_until(Duration::from_secs(15), || {
|
||||
guest.get_total_memory().unwrap_or_default() > 5_760_000
|
||||
}));
|
||||
assert!(guest.get_total_memory().unwrap_or_default() > 5_760_000);
|
||||
|
||||
// Check the VFIO device works when RAM is increased to 6GiB.
|
||||
// After guest memory hotplug, the VMM must refresh VFIO/iommufd DMA
|
||||
|
||||
Reference in New Issue
Block a user