vmm: add unit test for init_devices
@@ -2206,6 +2206,15 @@ mod tests {
assert!(vmm.attach_net_devices(&mut device_manager).is_err());
}
+ #[test]
+ fn test_init_devices() {
+ let mut vmm = create_vmm_object(InstanceState::Uninitialized);
+ vmm.default_kernel_config();
+ assert!(vmm.init_guest_memory().is_ok());
+
+ assert!(vmm.init_devices().is_ok());
+ }
+
#[test]
fn test_rescan() {
let mut vmm = create_vmm_object(InstanceState::Uninitialized);
