From 3def18f5026a8ae18ea4eb9cacc9346e58fa267b Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Tue, 7 May 2024 12:00:03 +0100 Subject: [PATCH] fuzz: Fix use of "guest_debug" conditional code Enable the use of the vmm crate with the "guest_debug" feature and make the code that exercises that in the fuzzer unconditional on "guest_debug" as a feature (as that is not specified as a feature in the fuzz workspace itself.) Signed-off-by: Rob Bradford --- fuzz/Cargo.toml | 2 +- fuzz/fuzz_targets/http_api.rs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/fuzz/Cargo.toml b/fuzz/Cargo.toml index a4e20acab..cc8f56ca3 100644 --- a/fuzz/Cargo.toml +++ b/fuzz/Cargo.toml @@ -24,7 +24,7 @@ once_cell = "1.19.0" seccompiler = "0.4.0" virtio-devices = { path = "../virtio-devices" } virtio-queue = "0.12.0" -vmm = { path = "../vmm" } +vmm = { path = "../vmm", features = ["guest_debug"]} vmm-sys-util = "0.12.1" vm-memory = "0.14.1" vm-migration = { path = "../vm-migration" } diff --git a/fuzz/fuzz_targets/http_api.rs b/fuzz/fuzz_targets/http_api.rs index b31a769b2..a3f328630 100644 --- a/fuzz/fuzz_targets/http_api.rs +++ b/fuzz/fuzz_targets/http_api.rs @@ -105,7 +105,7 @@ impl RequestHandler for StubApiRequestHandler { Ok(()) } - #[cfg(all(target_arch = "x86_64", feature = "guest_debug"))] + #[cfg(target_arch = "x86_64")] fn vm_coredump(&mut self, _: &str) -> Result<(), VmError> { Ok(()) } @@ -185,7 +185,6 @@ impl RequestHandler for StubApiRequestHandler { sgx_epc: None, numa: None, watchdog: false, - #[cfg(feature = "guest_debug")] gdb: false, pci_segments: None, platform: None,