fuzz: Add fuzzing infrastructure and QCOW fuzzer

Add the basic infrastructure for fuzzing along with a qcow fuzzer ported
from crosvm and adapted to our code.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford
2020-07-16 15:44:36 +01:00
committed by Sebastien Boeuf
parent 9267628e7c
commit 4d878418e5
4 changed files with 118 additions and 0 deletions

28
fuzz/Cargo.toml Normal file
View File

@@ -0,0 +1,28 @@
[package]
name = "cloud-hypervisor-fuzz"
version = "0.0.0"
authors = ["Automatically generated"]
publish = false
edition = "2018"
[package.metadata]
cargo-fuzz = true
[dependencies]
libc = "0.2.72"
libfuzzer-sys = "0.3"
qcow = { path = "../qcow" }
[dependencies.cloud-hypervisor]
path = ".."
# Prevent this from interfering with workspaces
[workspace]
members = ["."]
[[bin]]
name = "qcow"
path = "fuzz_targets/qcow.rs"
test = false
doc = false