mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
virtio-devices: Test config vector OOB does not panic
Verify that firing a config change interrupt with msix_config vector beyond the table size returns Ok without panicking. Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
This commit is contained in:
committed by
Rob Bradford
parent
6be080c083
commit
6daa9e14e6
@@ -1406,4 +1406,11 @@ mod unit_tests {
|
||||
intr.msix_config.lock().unwrap().set_msg_ctl(1u16 << 15);
|
||||
intr.trigger(VirtioInterruptType::Queue(0)).unwrap();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn config_vector_oob_does_not_panic() {
|
||||
let intr = make_msix_interrupt(2);
|
||||
intr.config_vector.store(0xFFFE, Ordering::Release);
|
||||
intr.trigger(VirtioInterruptType::Config).unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user