fuzz: Fix the building errors with recent changes

This patch adds two required dependencies to fuzz/Cargo.toml, and fixes
the building error on the 'block' fuzzer.

Signed-off-by: Bo Chen <chen.bo@intel.com>
This commit is contained in:
Bo Chen 2020-09-29 20:53:01 -07:00 committed by Rob Bradford
parent 2c2e7016c7
commit dda1df0a58
2 changed files with 4 additions and 0 deletions

View File

@ -10,9 +10,11 @@ edition = "2018"
cargo-fuzz = true
[dependencies]
kvm-ioctls = { git = "https://github.com/cloud-hypervisor/kvm-ioctls", branch = "ch" }
libc = "0.2.72"
libfuzzer-sys = "0.3"
qcow = { path = "../qcow" }
seccomp = { git = "https://github.com/firecracker-microvm/firecracker", tag = "v0.22.0" }
virtio-devices = { path = "../virtio-devices" }
vmm-sys-util = ">=0.3.1"
vm-virtio = { path = "../vm-virtio" }

View File

@ -16,6 +16,7 @@ use virtio_devices::{Block, VirtioDevice, VirtioInterrupt, VirtioInterruptType};
use vm_memory::{Bytes, GuestAddress, GuestMemoryAtomic, GuestMemoryMmap};
use vm_virtio::Queue;
use vmm_sys_util::eventfd::EventFd;
use seccomp::SeccompAction;
const MEM_SIZE: u64 = 256 * 1024 * 1024;
const DESC_SIZE: u64 = 16; // Bytes in one virtio descriptor.
@ -92,6 +93,7 @@ fuzz_target!(|bytes| {
false,
2,
256,
SeccompAction::Allow,
)
.unwrap();