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:
Anatol Belski
2026-05-04 22:08:54 +02:00
committed by Rob Bradford
parent 442e7f85fa
commit 088b1363e7

View File

@@ -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();
}
}