mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
tests: use basic_regular_guest macro in test_virtio_vsock_hotplug
Replace manual UbuntuDiskConfig and GuestFactory guest creation with the basic_regular_guest! macro in test_virtio_vsock_hotplug. The aarch64 variant chains with_kernel_path for EDK2 firmware support. Signed-off-by: Muminul Islam <muislam@microsoft.com>
This commit is contained in:
committed by
Rob Bradford
parent
b9c9e7265d
commit
aead6dd59f
@@ -2730,13 +2730,11 @@ mod common_parallel {
|
||||
|
||||
#[test]
|
||||
fn test_virtio_vsock_hotplug() {
|
||||
let disk_config = UbuntuDiskConfig::new(JAMMY_IMAGE_NAME.to_string());
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
let guest = GuestFactory::new_regular_guest_factory().create_guest(Box::new(disk_config));
|
||||
let guest = basic_regular_guest!(JAMMY_IMAGE_NAME);
|
||||
#[cfg(target_arch = "aarch64")]
|
||||
let guest = GuestFactory::new_regular_guest_factory()
|
||||
.create_guest(Box::new(disk_config))
|
||||
.with_kernel_path(edk2_path().to_str().unwrap());
|
||||
let guest =
|
||||
basic_regular_guest!(JAMMY_IMAGE_NAME).with_kernel_path(edk2_path().to_str().unwrap());
|
||||
_test_virtio_vsock(&guest, true);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user