test_infra: set default kernel path and cmdline in Guest

Initialize kernel_path and kernel_cmdline with standard
direct boot defaults in the Guest constructor instead of
None. This removes boilerplate from individual tests that
use the common direct kernel boot configuration.

Signed-off-by: Muminul Islam <muislam@microsoft.com>
This commit is contained in:
Muminul Islam
2026-02-27 14:33:05 -08:00
committed by Rob Bradford
parent 838a4f86c4
commit f2d3c17e1f
+2 -2
View File
@@ -985,8 +985,8 @@ impl Guest {
network, network,
vm_type: GuestVmType::Regular, vm_type: GuestVmType::Regular,
boot_timeout: DEFAULT_TCP_LISTENER_TIMEOUT, boot_timeout: DEFAULT_TCP_LISTENER_TIMEOUT,
kernel_path: None, kernel_path: direct_kernel_boot_path().to_str().map(String::from),
kernel_cmdline: None, kernel_cmdline: Some(DIRECT_KERNEL_BOOT_CMDLINE.to_string()),
console_type: None, console_type: None,
num_cpu: 1u32, num_cpu: 1u32,
nested: true, nested: true,