summary refs log tree commit diff
path: root/pkgs/cloud-hypervisor/vhost/0002-vhost_user-add-shared-memory-region-support.patch
blob: 4c9b27c3b9e62e3a08f832f5d417f68939a407a3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
From f66e63e8d419a5a4ca55ff957906875678b2bb44 Mon Sep 17 00:00:00 2001
From: David Stevens <stevensd@chromium.org>
Date: Wed, 15 Jun 2022 16:45:12 +0900
Subject: [PATCH 2/4] vhost_user: add shared memory region support
SPDX-FileCopyrightText: 2019 Intel Corporation. All Rights Reserved.
SPDX-FileCopyrightText: 2019-2021 Alibaba Cloud. All rights reserved.
SPDX-FileCopyrightText: The Chromium OS Authors
SPDX-FileCopyrightText: 2022 Unikie
SPDX-FileCopyrightText: 2023 Alyssa Ross <hi@alyssa.is>
SPDX-License-Identifier: Apache-2.0

Add support for shared memory regions to vhost-user. This is adding
support for a front-end message to query for necessary shared memory
regions plus back-end message to support mapping/unmapping files from
the shared memory region.

go/vvu-shared-memory

BUG=b:201745804
TEST=compiles

Change-Id: I35c5d260ee09175b68f6778b81883e0070ee0265
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3716344
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Commit-Queue: David Stevens <stevensd@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
(cherry-picked from commit f436e2706011fa5f34dc415972434aa3299ebc43)
Signed-off-by: Alyssa Ross <alyssa.ross@unikie.com>
---
 vhost-user-backend/src/handler.rs            |  10 +-
 vhost/src/vhost_user/backend_req.rs          |  20 ++-
 vhost/src/vhost_user/backend_req_handler.rs  |  15 +++
 vhost/src/vhost_user/dummy_backend.rs        |   4 +
 vhost/src/vhost_user/frontend.rs             |  24 ++++
 vhost/src/vhost_user/frontend_req_handler.rs |  53 +++++++-
 vhost/src/vhost_user/message.rs              | 132 ++++++++++++++++++-
 7 files changed, 244 insertions(+), 14 deletions(-)

diff --git a/vhost-user-backend/src/handler.rs b/vhost-user-backend/src/handler.rs
index 83f5293..f5a8f0f 100644
--- a/vhost-user-backend/src/handler.rs
+++ b/vhost-user-backend/src/handler.rs
@@ -11,9 +11,9 @@ use std::sync::Arc;
 use std::thread;
 
 use vhost::vhost_user::message::{
-    VhostUserConfigFlags, VhostUserMemoryRegion, VhostUserProtocolFeatures,
-    VhostUserSingleMemoryRegion, VhostUserVirtioFeatures, VhostUserVringAddrFlags,
-    VhostUserVringState,
+    VhostSharedMemoryRegion, VhostUserConfigFlags, VhostUserMemoryRegion,
+    VhostUserProtocolFeatures, VhostUserSingleMemoryRegion, VhostUserVirtioFeatures,
+    VhostUserVringAddrFlags, VhostUserVringState,
 };
 use vhost::vhost_user::{
     Backend, Error as VhostUserError, Result as VhostUserResult, VhostUserBackendReqHandlerMut,
@@ -617,6 +617,10 @@ where
 
         Ok(())
     }
+
+    fn get_shared_memory_regions(&mut self) -> VhostUserResult<Vec<VhostSharedMemoryRegion>> {
+        Ok(Vec::new())
+    }
 }
 
 impl<T: VhostUserBackend> Drop for VhostUserHandler<T> {
diff --git a/vhost/src/vhost_user/backend_req.rs b/vhost/src/vhost_user/backend_req.rs
index b43982f..948e1b2 100644
--- a/vhost/src/vhost_user/backend_req.rs
+++ b/vhost/src/vhost_user/backend_req.rs
@@ -46,12 +46,16 @@ impl BackendInternal {
         }
         self.sock.send_message(&hdr, body, fds)?;
 
-        self.wait_for_ack(&hdr)
+        self.wait_for_reply(&hdr)
     }
 
-    fn wait_for_ack(&mut self, hdr: &VhostUserMsgHeader<BackendReq>) -> Result<u64> {
+    fn wait_for_reply(&mut self, hdr: &VhostUserMsgHeader<BackendReq>) -> Result<u64> {
         self.check_state()?;
-        if !self.reply_ack_negotiated {
+        if !matches!(
+            hdr.get_code(),
+            Ok(BackendReq::SHMEM_MAP | BackendReq::SHMEM_UNMAP)
+        ) && !self.reply_ack_negotiated
+        {
             return Ok(0);
         }
 
@@ -129,6 +133,16 @@ impl Backend {
 }
 
 impl VhostUserFrontendReqHandler for Backend {
+    /// Handle shared memory region mapping requests.
+    fn shmem_map(&self, req: &VhostUserShmemMapMsg, fd: &dyn AsRawFd) -> HandlerResult<u64> {
+        self.send_message(BackendReq::SHMEM_MAP, req, Some(&[fd.as_raw_fd()]))
+    }
+
+    /// Handle shared memory region unmapping requests.
+    fn shmem_unmap(&self, req: &VhostUserShmemUnmapMsg) -> HandlerResult<u64> {
+        self.send_message(BackendReq::SHMEM_UNMAP, req, None)
+    }
+
     /// Forward vhost-user-fs map file requests to the backend.
     fn fs_backend_map(&self, fs: &VhostUserFSBackendMsg, fd: &dyn AsRawFd) -> HandlerResult<u64> {
         self.send_message(BackendReq::FS_MAP, fs, Some(&[fd.as_raw_fd()]))
diff --git a/vhost/src/vhost_user/backend_req_handler.rs b/vhost/src/vhost_user/backend_req_handler.rs
index 7b4cbe9..84486aa 100644
--- a/vhost/src/vhost_user/backend_req_handler.rs
+++ b/vhost/src/vhost_user/backend_req_handler.rs
@@ -70,6 +70,7 @@ pub trait VhostUserBackendReqHandler {
     fn get_max_mem_slots(&self) -> Result<u64>;
     fn add_mem_region(&self, region: &VhostUserSingleMemoryRegion, fd: File) -> Result<()>;
     fn remove_mem_region(&self, region: &VhostUserSingleMemoryRegion) -> Result<()>;
+    fn get_shared_memory_regions(&self) -> Result<Vec<VhostSharedMemoryRegion>>;
 }
 
 /// Services provided to the frontend by the backend without interior mutability.
@@ -118,6 +119,7 @@ pub trait VhostUserBackendReqHandlerMut {
     fn get_max_mem_slots(&mut self) -> Result<u64>;
     fn add_mem_region(&mut self, region: &VhostUserSingleMemoryRegion, fd: File) -> Result<()>;
     fn remove_mem_region(&mut self, region: &VhostUserSingleMemoryRegion) -> Result<()>;
+    fn get_shared_memory_regions(&mut self) -> Result<Vec<VhostSharedMemoryRegion>>;
 }
 
 impl<T: VhostUserBackendReqHandlerMut> VhostUserBackendReqHandler for Mutex<T> {
@@ -226,6 +228,10 @@ impl<T: VhostUserBackendReqHandlerMut> VhostUserBackendReqHandler for Mutex<T> {
     fn remove_mem_region(&self, region: &VhostUserSingleMemoryRegion) -> Result<()> {
         self.lock().unwrap().remove_mem_region(region)
     }
+
+    fn get_shared_memory_regions(&self) -> Result<Vec<VhostSharedMemoryRegion>> {
+        self.lock().unwrap().get_shared_memory_regions()
+    }
 }
 
 /// Server to handle service requests from frontends from the frontend communication channel.
@@ -519,6 +525,15 @@ impl<S: VhostUserBackendReqHandler> BackendReqHandler<S> {
                 let res = self.backend.remove_mem_region(&msg);
                 self.send_ack_message(&hdr, res)?;
             }
+            Ok(FrontendReq::GET_SHARED_MEMORY_REGIONS) => {
+                let regions = self.backend.get_shared_memory_regions()?;
+                let mut buf = Vec::new();
+                let msg = VhostUserU64::new(regions.len() as u64);
+                for r in regions {
+                    buf.extend_from_slice(r.as_slice())
+                }
+                self.send_reply_with_payload(&hdr, &msg, buf.as_slice())?;
+            }
             _ => {
                 return Err(Error::InvalidMessage);
             }
diff --git a/vhost/src/vhost_user/dummy_backend.rs b/vhost/src/vhost_user/dummy_backend.rs
index 9d9f977..4d9aef1 100644
--- a/vhost/src/vhost_user/dummy_backend.rs
+++ b/vhost/src/vhost_user/dummy_backend.rs
@@ -291,4 +291,8 @@ impl VhostUserBackendReqHandlerMut for DummyBackendReqHandler {
     fn remove_mem_region(&mut self, _region: &VhostUserSingleMemoryRegion) -> Result<()> {
         Ok(())
     }
+
+    fn get_shared_memory_regions(&mut self) -> Result<Vec<VhostSharedMemoryRegion>> {
+        Ok(Vec::new())
+    }
 }
diff --git a/vhost/src/vhost_user/frontend.rs b/vhost/src/vhost_user/frontend.rs
index 8674be7..4a745a8 100644
--- a/vhost/src/vhost_user/frontend.rs
+++ b/vhost/src/vhost_user/frontend.rs
@@ -72,6 +72,9 @@ pub trait VhostUserFrontend: VhostBackend {
 
     /// Remove a guest memory mapping from vhost.
     fn remove_mem_region(&mut self, region: &VhostUserMemoryRegionInfo) -> Result<()>;
+
+    /// Gets the shared memory regions used by the device.
+    fn get_shared_memory_regions(&self) -> Result<Vec<VhostSharedMemoryRegion>>;
 }
 
 fn error_code<T>(err: VhostUserError) -> Result<T> {
@@ -517,6 +520,27 @@ impl VhostUserFrontend for Frontend {
         let hdr = node.send_request_with_body(FrontendReq::REM_MEM_REG, &body, None)?;
         node.wait_for_ack(&hdr).map_err(|e| e.into())
     }
+
+    fn get_shared_memory_regions(&self) -> Result<Vec<VhostSharedMemoryRegion>> {
+        let mut node = self.node();
+        let hdr = node.send_request_header(FrontendReq::GET_SHARED_MEMORY_REGIONS, None)?;
+        let (body_reply, buf_reply, rfds) = node.recv_reply_with_payload::<VhostUserU64>(&hdr)?;
+        let struct_size = mem::size_of::<VhostSharedMemoryRegion>();
+        if rfds.is_some() || buf_reply.len() != body_reply.value as usize * struct_size {
+            return error_code(VhostUserError::InvalidMessage);
+        }
+        let mut regions = Vec::new();
+        let mut offset = 0;
+        for _ in 0..body_reply.value {
+            regions.push(
+                // Can't fail because the input is the correct size.
+                *VhostSharedMemoryRegion::from_slice(&buf_reply[offset..(offset + struct_size)])
+                    .unwrap(),
+            );
+            offset += struct_size;
+        }
+        Ok(regions)
+    }
 }
 
 impl AsRawFd for Frontend {
diff --git a/vhost/src/vhost_user/frontend_req_handler.rs b/vhost/src/vhost_user/frontend_req_handler.rs
index fb2dc16..cd4f604 100644
--- a/vhost/src/vhost_user/frontend_req_handler.rs
+++ b/vhost/src/vhost_user/frontend_req_handler.rs
@@ -33,6 +33,16 @@ pub trait VhostUserFrontendReqHandler {
         Err(std::io::Error::from_raw_os_error(libc::ENOSYS))
     }
 
+    /// Handle shared memory region mapping requests.
+    fn shmem_map(&self, _req: &VhostUserShmemMapMsg, _fd: &dyn AsRawFd) -> HandlerResult<u64> {
+        Err(std::io::Error::from_raw_os_error(libc::ENOSYS))
+    }
+
+    /// Handle shared memory region unmapping requests.
+    fn shmem_unmap(&self, _req: &VhostUserShmemUnmapMsg) -> HandlerResult<u64> {
+        Err(std::io::Error::from_raw_os_error(libc::ENOSYS))
+    }
+
     /// Handle virtio-fs map file requests.
     fn fs_backend_map(&self, _fs: &VhostUserFSBackendMsg, _fd: &dyn AsRawFd) -> HandlerResult<u64> {
         Err(std::io::Error::from_raw_os_error(libc::ENOSYS))
@@ -66,6 +76,16 @@ pub trait VhostUserFrontendReqHandlerMut {
         Err(std::io::Error::from_raw_os_error(libc::ENOSYS))
     }
 
+    /// Handle shared memory region mapping requests.
+    fn shmem_map(&mut self, _req: &VhostUserShmemMapMsg, _fd: &dyn AsRawFd) -> HandlerResult<u64> {
+        Err(std::io::Error::from_raw_os_error(libc::ENOSYS))
+    }
+
+    /// Handle shared memory region unmapping requests.
+    fn shmem_unmap(&mut self, _req: &VhostUserShmemUnmapMsg) -> HandlerResult<u64> {
+        Err(std::io::Error::from_raw_os_error(libc::ENOSYS))
+    }
+
     /// Handle virtio-fs map file requests.
     fn fs_backend_map(
         &mut self,
@@ -103,6 +123,14 @@ impl<S: VhostUserFrontendReqHandlerMut> VhostUserFrontendReqHandler for Mutex<S>
         self.lock().unwrap().handle_config_change()
     }
 
+    fn shmem_map(&self, req: &VhostUserShmemMapMsg, fd: &dyn AsRawFd) -> HandlerResult<u64> {
+        self.lock().unwrap().shmem_map(req, fd)
+    }
+
+    fn shmem_unmap(&self, req: &VhostUserShmemUnmapMsg) -> HandlerResult<u64> {
+        self.lock().unwrap().shmem_unmap(req)
+    }
+
     fn fs_backend_map(&self, fs: &VhostUserFSBackendMsg, fd: &dyn AsRawFd) -> HandlerResult<u64> {
         self.lock().unwrap().fs_backend_map(fs, fd)
     }
@@ -230,6 +258,19 @@ impl<S: VhostUserFrontendReqHandler> FrontendReqHandler<S> {
                     .handle_config_change()
                     .map_err(Error::ReqHandlerError)
             }
+            Ok(BackendReq::SHMEM_MAP) => {
+                let msg = self.extract_msg_body::<VhostUserShmemMapMsg>(&hdr, size, &buf)?;
+                // check_attached_files() has validated files
+                self.backend
+                    .shmem_map(&msg, &files.unwrap()[0])
+                    .map_err(Error::ReqHandlerError)
+            }
+            Ok(BackendReq::SHMEM_UNMAP) => {
+                let msg = self.extract_msg_body::<VhostUserShmemUnmapMsg>(&hdr, size, &buf)?;
+                self.backend
+                    .shmem_unmap(&msg)
+                    .map_err(Error::ReqHandlerError)
+            }
             Ok(BackendReq::FS_MAP) => {
                 let msg = self.extract_msg_body::<VhostUserFSBackendMsg>(&hdr, size, &buf)?;
                 // check_attached_files() has validated files
@@ -259,7 +300,7 @@ impl<S: VhostUserFrontendReqHandler> FrontendReqHandler<S> {
             _ => Err(Error::InvalidMessage),
         };
 
-        self.send_ack_message(&hdr, &res)?;
+        self.send_reply(&hdr, &res)?;
 
         res
     }
@@ -293,7 +334,7 @@ impl<S: VhostUserFrontendReqHandler> FrontendReqHandler<S> {
         files: &Option<Vec<File>>,
     ) -> Result<()> {
         match hdr.get_code() {
-            Ok(BackendReq::FS_MAP | BackendReq::FS_IO) => {
+            Ok(BackendReq::SHMEM_MAP | BackendReq::FS_MAP | BackendReq::FS_IO) => {
                 // Expect a single file is passed.
                 match files {
                     Some(files) if files.len() == 1 => Ok(()),
@@ -335,12 +376,16 @@ impl<S: VhostUserFrontendReqHandler> FrontendReqHandler<S> {
         ))
     }
 
-    fn send_ack_message(
+    fn send_reply(
         &mut self,
         req: &VhostUserMsgHeader<BackendReq>,
         res: &Result<u64>,
     ) -> Result<()> {
-        if self.reply_ack_negotiated && req.is_need_reply() {
+        if matches!(
+            req.get_code(),
+            Ok(BackendReq::SHMEM_MAP | BackendReq::SHMEM_UNMAP)
+        ) || (self.reply_ack_negotiated && req.is_need_reply())
+        {
             let hdr = self.new_reply_header::<VhostUserU64>(req)?;
             let def_err = libc::EINVAL;
             let val = match res {
diff --git a/vhost/src/vhost_user/message.rs b/vhost/src/vhost_user/message.rs
index 43e7314..67fc19a 100644
--- a/vhost/src/vhost_user/message.rs
+++ b/vhost/src/vhost_user/message.rs
@@ -178,6 +178,8 @@ enum_value! {
         /// Query the backend for its device status as defined in the VIRTIO
         /// specification.
         GET_STATUS = 40,
+        /// Get a list of the device's shared memory regions.
+        GET_SHARED_MEMORY_REGIONS = 41,
     }
 }
 
@@ -197,14 +199,18 @@ enum_value! {
         VRING_CALL = 4,
         /// Indicate that an error occurred on the specific vring.
         VRING_ERR = 5,
+        /// Indicates a request to map a fd into a shared memory region.
+        SHMEM_MAP = 6,
+        /// Indicates a request to unmap part of a shared memory region.
+        SHMEM_UNMAP = 7,
         /// Virtio-fs draft: map file content into the window.
-        FS_MAP = 6,
+        FS_MAP = 8,
         /// Virtio-fs draft: unmap file content from the window.
-        FS_UNMAP = 7,
+        FS_UNMAP = 9,
         /// Virtio-fs draft: sync file content.
-        FS_SYNC = 8,
+        FS_SYNC = 10,
         /// Virtio-fs draft: perform a read/write from an fd directly to GPA.
-        FS_IO = 9,
+        FS_IO = 11,
     }
 }
 
@@ -955,6 +961,99 @@ impl VhostUserMsgValidator for VhostUserFSBackendMsg {
     }
 }
 
+bitflags! {
+    #[derive(Default, Copy, Clone)]
+    /// Flags for SHMEM_MAP messages.
+    pub struct VhostUserShmemMapMsgFlags: u8 {
+        /// Empty permission.
+        const EMPTY = 0x0;
+        /// Read permission.
+        const MAP_R = 0x1;
+        /// Write permission.
+        const MAP_W = 0x2;
+    }
+}
+
+/// Backend request message to map a file into a shared memory region.
+#[repr(C, packed)]
+#[derive(Default, Copy, Clone)]
+pub struct VhostUserShmemMapMsg {
+    /// Flags for the mmap operation
+    pub flags: VhostUserShmemMapMsgFlags,
+    /// Shared memory region id.
+    pub shmid: u8,
+    padding: [u8; 6],
+    /// Offset into the shared memory region.
+    pub shm_offset: u64,
+    /// File offset.
+    pub fd_offset: u64,
+    /// Size of region to map.
+    pub len: u64,
+}
+// Safe because it only has data and has no implicit padding.
+unsafe impl ByteValued for VhostUserShmemMapMsg {}
+
+impl VhostUserMsgValidator for VhostUserShmemMapMsg {
+    fn is_valid(&self) -> bool {
+        (self.flags.bits() & !VhostUserFSBackendMsgFlags::all().bits() as u8) == 0
+            && self.fd_offset.checked_add(self.len).is_some()
+            && self.shm_offset.checked_add(self.len).is_some()
+    }
+}
+
+impl VhostUserShmemMapMsg {
+    /// New instance of VhostUserShmemMapMsg struct
+    pub fn new(
+        shmid: u8,
+        shm_offset: u64,
+        fd_offset: u64,
+        len: u64,
+        flags: VhostUserShmemMapMsgFlags,
+    ) -> Self {
+        Self {
+            flags,
+            shmid,
+            padding: [0; 6],
+            shm_offset,
+            fd_offset,
+            len,
+        }
+    }
+}
+
+/// Backend request message to unmap part of a shared memory region.
+#[repr(C, packed)]
+#[derive(Default, Copy, Clone)]
+pub struct VhostUserShmemUnmapMsg {
+    /// Shared memory region id.
+    pub shmid: u8,
+    padding: [u8; 7],
+    /// Offset into the shared memory region.
+    pub shm_offset: u64,
+    /// Size of region to unmap.
+    pub len: u64,
+}
+// Safe because it only has data and has no implicit padding.
+unsafe impl ByteValued for VhostUserShmemUnmapMsg {}
+
+impl VhostUserMsgValidator for VhostUserShmemUnmapMsg {
+    fn is_valid(&self) -> bool {
+        self.shm_offset.checked_add(self.len).is_some()
+    }
+}
+
+impl VhostUserShmemUnmapMsg {
+    /// New instance of VhostUserShmemUnmapMsg struct
+    pub fn new(shmid: u8, shm_offset: u64, len: u64) -> Self {
+        Self {
+            shmid,
+            padding: [0; 7],
+            shm_offset,
+            len,
+        }
+    }
+}
+
 /// Inflight I/O descriptor state for split virtqueues
 #[repr(C, packed)]
 #[derive(Clone, Copy, Default)]
@@ -1086,6 +1185,31 @@ impl QueueRegionPacked {
     }
 }
 
+/// Virtio shared memory descriptor.
+#[repr(packed)]
+#[derive(Default, Copy, Clone)]
+pub struct VhostSharedMemoryRegion {
+    /// The shared memory region's shmid.
+    pub id: u8,
+    /// Padding
+    padding: [u8; 7],
+    /// The length of the shared memory region.
+    pub length: u64,
+}
+// Safe because it only has data and has no implicit padding.
+unsafe impl ByteValued for VhostSharedMemoryRegion {}
+
+impl VhostSharedMemoryRegion {
+    /// New instance of VhostSharedMemoryRegion struct
+    pub fn new(id: u8, length: u64) -> Self {
+        VhostSharedMemoryRegion {
+            id,
+            padding: [0; 7],
+            length,
+        }
+    }
+}
+
 #[cfg(test)]
 mod tests {
     use super::*;
-- 
2.44.0