tests: centralize default memory args in helpers

Replace hard-coded --memory args in simple launch tests
with GuestCommand defaults driven by Guest state.
Add Guest.mem_size_str with a default of 512M and introduce
default_memory_string() and GuestCommand::default_memory().

Signed-off-by: Muminul Islam <muislam@microsoft.com>
This commit is contained in:
Muminul Islam
2026-02-22 22:25:32 -08:00
committed by Rob Bradford
parent 45a5c7a04e
commit 05aeef06e5
2 changed files with 11 additions and 1 deletions

View File

@@ -2546,7 +2546,7 @@ fn _test_simple_launch(guest: &Guest) {
let mut child = GuestCommand::new(guest)
.default_cpus()
.args(["--memory", "size=512M"])
.default_memory()
.default_kernel_cmdline()
.default_disks()
.default_net()