mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
virtio-devices: vmm: fuzz: Switch to DiskBackend
Change Block to hold DiskBackend instead of Box<dyn async_io::DiskFile>. In device_manager, existing formats (raw, vhd, vhdx) are wrapped in DiskBackend::Legacy while QcowDiskSync uses DiskBackend::Next. The fuzz target is updated accordingly. The Error::DiskResize variant now carries BlockError instead of DiskFileError, matching the BlockResult return type of DiskBackend::resize(). Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
This commit is contained in:
committed by
Rob Bradford
parent
264013b424
commit
b4dad66d35
@@ -16,6 +16,7 @@ use std::sync::Arc;
|
||||
use std::{ffi, io};
|
||||
|
||||
use block::async_io::DiskFile;
|
||||
use block::disk_file::DiskBackend;
|
||||
use block::fcntl::LockGranularityChoice;
|
||||
use block::raw_sync::RawFileDiskSync;
|
||||
use libfuzzer_sys::{fuzz_target, Corpus};
|
||||
@@ -56,7 +57,7 @@ fuzz_target!(|bytes: &[u8]| -> Corpus {
|
||||
let queue_affinity = BTreeMap::new();
|
||||
let mut block = Block::new(
|
||||
"tmp".to_owned(),
|
||||
qcow_disk,
|
||||
DiskBackend::Legacy(qcow_disk),
|
||||
PathBuf::from(""),
|
||||
false,
|
||||
false,
|
||||
|
||||
Reference in New Issue
Block a user