Skip to content

Commit 847b155

Browse files
Serban Iorgaacatangiu
authored andcommitted
fix test_attach_legacy_devices
A KVM patch added a new validation when using the KVM_IRQFD ioctl. This breaks our test_attach_legacy_devices unit test. We can fix it by calling setup_interrupt_controller() before attaching the legacy devices. Signed-off-by: Serban Iorga <[email protected]>
1 parent 1e1cb6f commit 847b155

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

vmm/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3238,6 +3238,8 @@ mod tests {
32383238
#[test]
32393239
fn test_attach_legacy_devices() {
32403240
let mut vmm = create_vmm_object(InstanceState::Uninitialized);
3241+
vmm.setup_interrupt_controller()
3242+
.expect("Failed to setup interrupt controller");
32413243

32423244
assert!(vmm.attach_legacy_devices().is_ok());
32433245
assert!(vmm.legacy_device_manager.io_bus.get_device(0x3f8).is_some());

0 commit comments

Comments
 (0)