diff --git a/virtio-devices/src/vsock/device.rs b/virtio-devices/src/vsock/device.rs index 9350e6b03..40affae89 100644 --- a/virtio-devices/src/vsock/device.rs +++ b/virtio-devices/src/vsock/device.rs @@ -782,6 +782,7 @@ mod tests { let mut epoll_helper = EpollHelper::new(&ctx.handler.kill_evt, &ctx.handler.pause_evt).unwrap(); + assert_eq!(ctx.guest_rxvq.used.idx.get(), 0); assert!( ctx.handler.handle_event(&mut epoll_helper, &event).is_err(), "handle_event() should have failed" @@ -802,6 +803,7 @@ mod tests { let mut epoll_helper = EpollHelper::new(&ctx.handler.kill_evt, &ctx.handler.pause_evt).unwrap(); + assert_eq!(ctx.guest_evvq.used.idx.get(), 0); assert!( ctx.handler.handle_event(&mut epoll_helper, &event).is_err(), "handle_event() should have failed" diff --git a/virtio-devices/src/vsock/mod.rs b/virtio-devices/src/vsock/mod.rs index cc77a2fd3..1b2a473e3 100644 --- a/virtio-devices/src/vsock/mod.rs +++ b/virtio-devices/src/vsock/mod.rs @@ -256,7 +256,6 @@ mod tests { pub struct TestContext { pub cid: u64, pub mem: GuestMemoryMmap, - pub mem_size: usize, pub device: Vsock, } @@ -267,7 +266,6 @@ mod tests { Self { cid: CID as u64, mem: GuestMemoryMmap::from_ranges(&[(GuestAddress(0), MEM_SIZE)]).unwrap(), - mem_size: MEM_SIZE, device: Vsock::new( String::from("vsock"), CID,