vhost-user-server test: Use features constant

Add an associated const to MockVhostBackend that reflects the feature
bits it supports, so we can easily verify this value in other places.

Signed-off-by: Hanna Czenczek <hreitz@redhat.com>
This commit is contained in:
Hanna Czenczek 2024-10-17 10:48:34 +02:00 committed by Stefano Garzarella
parent 72379ea0e1
commit ff08ca095c

View file

@ -26,6 +26,8 @@ struct MockVhostBackend {
}
impl MockVhostBackend {
const SUPPORTED_FEATURES: u64 = 0xffff_ffff_ffff_ffff;
fn new() -> Self {
MockVhostBackend {
events: 0,
@ -48,7 +50,7 @@ impl VhostUserBackendMut for MockVhostBackend {
}
fn features(&self) -> u64 {
0xffff_ffff_ffff_ffff
Self::SUPPORTED_FEATURES
}
fn acked_features(&mut self, features: u64) {