From 6aad6e40c8df3e94ee7d99dd83dec7510cf4fb31 Mon Sep 17 00:00:00 2001 From: Muminul Islam Date: Sat, 21 Mar 2026 16:59:34 -0700 Subject: [PATCH] tests: use basic_regular_guest macro in OVMF test Refactor test_focal_ovmf to use the basic_regular_guest! macro with the with_kernel() builder instead of manually constructing UbuntuDiskConfig and setting kernel_path. This also removes leftover unused disk_config in test_focal_hypervisor_fw. Signed-off-by: Muminul Islam --- cloud-hypervisor/tests/integration.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/cloud-hypervisor/tests/integration.rs b/cloud-hypervisor/tests/integration.rs index 04f61f59e..972b979fb 100644 --- a/cloud-hypervisor/tests/integration.rs +++ b/cloud-hypervisor/tests/integration.rs @@ -47,7 +47,6 @@ mod common_parallel { #[test] #[cfg(target_arch = "x86_64")] fn test_focal_hypervisor_fw() { - let disk_config = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string()); let guest = basic_regular_guest!(FOCAL_IMAGE_NAME) .with_kernel(fw_path(FwType::RustHypervisorFirmware)); _test_simple_launch(&guest); @@ -56,9 +55,7 @@ mod common_parallel { #[test] #[cfg(target_arch = "x86_64")] fn test_focal_ovmf() { - let disk_config = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string()); - let mut guest = Guest::new(Box::new(disk_config)); - guest.kernel_path = Some(fw_path(FwType::Ovmf)); + let guest = basic_regular_guest!(FOCAL_IMAGE_NAME).with_kernel(fw_path(FwType::Ovmf)); _test_simple_launch(&guest); }