()
| 183 | #[test] |
| 184 | #[cfg(not(feature = "mshv"))] |
| 185 | fn test_large_vm() { |
| 186 | let disk_config = UbuntuDiskConfig::new(JAMMY_IMAGE_NAME.to_string()); |
| 187 | let guest = Guest::new(Box::new(disk_config)); |
| 188 | let mut cmd = GuestCommand::new(&guest); |
| 189 | cmd.args(["--cpus", "boot=48"]) |
| 190 | .args(["--memory", "size=5120M"]) |
| 191 | .args(["--kernel", direct_kernel_boot_path().to_str().unwrap()]) |
| 192 | .args(["--cmdline", DIRECT_KERNEL_BOOT_CMDLINE]) |
| 193 | .args(["--serial", "tty"]) |
| 194 | .args(["--console", "off"]) |
| 195 | .capture_output() |
| 196 | .default_disks() |
| 197 | .default_net(); |
| 198 | |
| 199 | let mut child = cmd.spawn().unwrap(); |
| 200 | |
| 201 | guest.wait_vm_boot().unwrap(); |
| 202 | |
| 203 | let r = std::panic::catch_unwind(|| { |
| 204 | assert_eq!(guest.get_cpu_count().unwrap_or_default(), 48); |
| 205 | assert_eq!( |
| 206 | guest |
| 207 | .ssh_command("lscpu | grep \"On-line\" | cut -f 2 -d \":\" | sed \"s# *##\"") |
| 208 | .unwrap() |
| 209 | .trim(), |
| 210 | "0-47" |
| 211 | ); |
| 212 | |
| 213 | assert!(guest.get_total_memory().unwrap_or_default() > 5_000_000); |
| 214 | }); |
| 215 | |
| 216 | kill_child(&mut child); |
| 217 | let output = child.wait_with_output().unwrap(); |
| 218 | |
| 219 | handle_child_output(r, &output); |
| 220 | } |
| 221 | |
| 222 | #[test] |
| 223 | #[cfg(not(feature = "mshv"))] |
nothing calls this directly
no test coverage detected