()
| 5002 | |
| 5003 | #[test] |
| 5004 | fn test_config_validation() { |
| 5005 | let mut valid_config = VmConfig { |
| 5006 | cpus: CpusConfig { |
| 5007 | boot_vcpus: 1, |
| 5008 | max_vcpus: 1, |
| 5009 | ..Default::default() |
| 5010 | }, |
| 5011 | memory: MemoryConfig { |
| 5012 | size: 536_870_912, |
| 5013 | mergeable: false, |
| 5014 | hotplug_method: HotplugMethod::Acpi, |
| 5015 | hotplug_size: None, |
| 5016 | hotplugged_size: None, |
| 5017 | shared: false, |
| 5018 | hugepages: false, |
| 5019 | hugepage_size: None, |
| 5020 | prefault: false, |
| 5021 | zones: None, |
| 5022 | thp: true, |
| 5023 | }, |
| 5024 | payload: Some(PayloadConfig { |
| 5025 | kernel: Some(PathBuf::from("/path/to/kernel")), |
| 5026 | firmware: None, |
| 5027 | cmdline: None, |
| 5028 | initramfs: None, |
| 5029 | #[cfg(feature = "igvm")] |
| 5030 | igvm: None, |
| 5031 | #[cfg(feature = "sev_snp")] |
| 5032 | host_data: Some( |
| 5033 | "243eb7dc1a21129caa91dcbb794922b933baecb5823a377eb431188673288c07".to_string(), |
| 5034 | ), |
| 5035 | #[cfg(feature = "fw_cfg")] |
| 5036 | fw_cfg_config: None, |
| 5037 | }), |
| 5038 | rate_limit_groups: None, |
| 5039 | disks: None, |
| 5040 | net: None, |
| 5041 | rng: RngConfig { |
| 5042 | src: PathBuf::from("/dev/urandom"), |
| 5043 | pci_common: PciDeviceCommonConfig::default(), |
| 5044 | }, |
| 5045 | balloon: None, |
| 5046 | fs: None, |
| 5047 | generic_vhost_user: None, |
| 5048 | pmem: None, |
| 5049 | serial: SerialConfig { |
| 5050 | common: CommonConsoleConfig { |
| 5051 | file: None, |
| 5052 | mode: ConsoleOutputMode::Null, |
| 5053 | socket: None, |
| 5054 | }, |
| 5055 | }, |
| 5056 | console: ConsoleConfig { |
| 5057 | common: CommonConsoleConfig { |
| 5058 | file: None, |
| 5059 | mode: ConsoleOutputMode::Tty, |
| 5060 | socket: None, |
| 5061 | }, |
nothing calls this directly
no test coverage detected