diff --git a/devices/src/virtio/vhost/user/device/handler.rs b/devices/src/virtio/vhost/user/device/handler.rs index 1ccce24a57..9e7d4bd7a4 100644 --- a/devices/src/virtio/vhost/user/device/handler.rs +++ b/devices/src/virtio/vhost/user/device/handler.rs @@ -997,6 +997,9 @@ mod tests { .unwrap(); } + // The VMM side is supposed to stop before the device side. + drop(vmm_handler); + vmm_bar.wait(); }); @@ -1035,5 +1038,10 @@ mod tests { } dev_bar.wait(); + + match listener.handle_request() { + Err(VhostError::ClientExit) => (), + r => panic!("Err(ClientExit) was expected but {:?}", r), + } } }