From 3645d916f393b08230003bd1c849eef7118a4580 Mon Sep 17 00:00:00 2001 From: Bo Chen Date: Wed, 13 May 2026 19:19:40 +0000 Subject: [PATCH] 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 --- cloud-hypervisor/tests/integration.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cloud-hypervisor/tests/integration.rs b/cloud-hypervisor/tests/integration.rs index 561a52993..14d709825 100644 --- a/cloud-hypervisor/tests/integration.rs +++ b/cloud-hypervisor/tests/integration.rs @@ -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