mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-05 18:20:34 +00:00
fuse: Fix build error with fuzzing cfg flag
BUG=chromium:1160986 TEST=run `RUSTFLAGS="--cfg=fuzzing" cargo build` Change-Id: If7a4091a67bc119ae06d576fe9d6f410759c8f9f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2616038 Tested-by: Keiichi Watanabe <keiichiw@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Auto-Submit: Keiichi Watanabe <keiichiw@chromium.org> Reviewed-by: Chirantan Ekbote <chirantan@chromium.org> Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>
This commit is contained in:
parent
191444797d
commit
9eb640ce0d
1 changed files with 7 additions and 3 deletions
|
@ -3,7 +3,7 @@
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
use crate::filesystem::{DirEntry, DirectoryIterator, FileSystem, ZeroCopyReader, ZeroCopyWriter};
|
use crate::filesystem::{DirEntry, DirectoryIterator, FileSystem, ZeroCopyReader, ZeroCopyWriter};
|
||||||
use crate::server::{Reader, Server, Writer};
|
use crate::server::{Mapper, Reader, Server, Writer};
|
||||||
|
|
||||||
// Use a file system that does nothing since we are fuzzing the server implementation.
|
// Use a file system that does nothing since we are fuzzing the server implementation.
|
||||||
struct NullFs;
|
struct NullFs;
|
||||||
|
@ -21,8 +21,12 @@ impl DirectoryIterator for NullIter {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Fuzz the server implementation.
|
/// Fuzz the server implementation.
|
||||||
pub fn fuzz_server<R: Reader + ZeroCopyReader, W: Writer + ZeroCopyWriter>(r: R, w: W) {
|
pub fn fuzz_server<R: Reader + ZeroCopyReader, W: Writer + ZeroCopyWriter, M: Mapper>(
|
||||||
|
r: R,
|
||||||
|
w: W,
|
||||||
|
m: M,
|
||||||
|
) {
|
||||||
let server = Server::new(NullFs);
|
let server = Server::new(NullFs);
|
||||||
|
|
||||||
let _ = server.handle_message(r, w);
|
let _ = server.handle_message(r, w, m);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue