mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
virtio-devices: Test trigger with NO_VECTOR returns Ok
Verify that triggering an interrupt when the vector is set to VIRTQ_MSI_NO_VECTOR short-circuits and returns Ok. Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
This commit is contained in:
committed by
Rob Bradford
parent
442e7f85fa
commit
088b1363e7
@@ -1385,4 +1385,10 @@ mod unit_tests {
|
||||
intr.queues_vectors.lock().unwrap()[0] = 0xFFFE;
|
||||
intr.trigger(VirtioInterruptType::Queue(0)).unwrap();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn trigger_with_no_vector_returns_ok() {
|
||||
let intr = make_msix_interrupt(2);
|
||||
intr.trigger(VirtioInterruptType::Queue(0)).unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user