From ff08ca095cb1407eee490d2597cfbd21b834690c Mon Sep 17 00:00:00 2001 From: Hanna Czenczek Date: Thu, 17 Oct 2024 10:48:34 +0200 Subject: [PATCH] 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 --- vhost-user-backend/tests/vhost-user-server.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vhost-user-backend/tests/vhost-user-server.rs b/vhost-user-backend/tests/vhost-user-server.rs index 7f78e2a..f453412 100644 --- a/vhost-user-backend/tests/vhost-user-server.rs +++ b/vhost-user-backend/tests/vhost-user-server.rs @@ -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) {