MCPcopy Create free account
hub / github.com/cloud-hypervisor/cloud-hypervisor / detect_raw_image

Function detect_raw_image

block/src/factory.rs:239–246  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

237
238 #[test]
239 fn detect_raw_image() {
240 let tmp = TempFile::new().unwrap();
241 tmp.as_file().set_len(1 << 20).unwrap();
242 let path = tmp.as_path().to_owned();
243 let options = default_options(&path);
244 let opened = open_disk(&options).unwrap();
245 assert_eq!(opened.image_type, ImageType::Raw);
246 }
247
248 #[test]
249 fn detect_qcow2_image() {

Callers

nothing calls this directly

Calls 4

newFunction · 0.85
default_optionsFunction · 0.85
open_diskFunction · 0.85
set_lenMethod · 0.45

Tested by

no test coverage detected