mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
tests: centralize default CPU arguments in test infrastructure
Replace the hard-coded .args(["--cpus", "boot=1"]) in the simple launch integration test with a shared helper (default_cpus) from test infrastructure. Extend Guest with explicit CPU-related defaults (num_cpu, nested) and add default_cpus_string() so CPU configuration is derived from guest state instead of being duplicated at call sites. This refactor improves consistency and makes CPU defaults easier to maintain across integration tests. Signed-off-by: Muminul Islam <muislam@microsoft.com>
This commit is contained in:
committed by
Rob Bradford
parent
fdc51d923f
commit
60c6242bde
@@ -2545,7 +2545,7 @@ fn _test_simple_launch(guest: &Guest) {
|
||||
let event_path = temp_event_monitor_path(&guest.tmp_dir);
|
||||
|
||||
let mut child = GuestCommand::new(guest)
|
||||
.args(["--cpus", "boot=1"])
|
||||
.default_cpus()
|
||||
.args(["--memory", "size=512M"])
|
||||
.default_kernel_cmdline()
|
||||
.default_disks()
|
||||
|
||||
Reference in New Issue
Block a user