Skip to content

Commit 96e021e

Browse files
vmm: add unit test for init_devices
Signed-off-by: Andreea Florescu <[email protected]>
1 parent 834624a commit 96e021e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

vmm/src/lib.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2206,6 +2206,15 @@ mod tests {
22062206
assert!(vmm.attach_net_devices(&mut device_manager).is_err());
22072207
}
22082208

2209+
#[test]
2210+
fn test_init_devices() {
2211+
let mut vmm = create_vmm_object(InstanceState::Uninitialized);
2212+
vmm.default_kernel_config();
2213+
assert!(vmm.init_guest_memory().is_ok());
2214+
2215+
assert!(vmm.init_devices().is_ok());
2216+
}
2217+
22092218
#[test]
22102219
fn test_rescan() {
22112220
let mut vmm = create_vmm_object(InstanceState::Uninitialized);

0 commit comments

Comments
 (0)