MCPcopy Create free account
hub / github.com/cloud-hypervisor/cloud-hypervisor / test_huge_memory

Function test_huge_memory

cloud-hypervisor/tests/integration.rs:224–248  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

222 #[test]
223 #[cfg(not(feature = "mshv"))]
224 fn test_huge_memory() {
225 let disk_config = UbuntuDiskConfig::new(JAMMY_IMAGE_NAME.to_string());
226 let guest = Guest::new(Box::new(disk_config));
227 let mut cmd = GuestCommand::new(&guest);
228 cmd.default_cpus()
229 .args(["--memory", "size=128G"])
230 .args(["--kernel", direct_kernel_boot_path().to_str().unwrap()])
231 .args(["--cmdline", DIRECT_KERNEL_BOOT_CMDLINE])
232 .capture_output()
233 .default_disks()
234 .default_net();
235
236 let mut child = cmd.spawn().unwrap();
237
238 guest.wait_vm_boot().unwrap();
239
240 let r = std::panic::catch_unwind(|| {
241 assert!(guest.get_total_memory().unwrap_or_default() > 128_000_000);
242 });
243
244 kill_child(&mut child);
245 let output = child.wait_with_output().unwrap();
246
247 handle_child_output(r, &output);
248 }
249
250 #[test]
251 fn test_power_button() {

Callers

nothing calls this directly

Calls 11

newFunction · 0.85
direct_kernel_boot_pathFunction · 0.85
kill_childFunction · 0.85
handle_child_outputFunction · 0.85
default_netMethod · 0.80
default_disksMethod · 0.80
capture_outputMethod · 0.80
argsMethod · 0.80
default_cpusMethod · 0.80
spawnMethod · 0.80
wait_vm_bootMethod · 0.80

Tested by

no test coverage detected