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

Function default_header_v2

block/src/qcow/mod.rs:2480–2489  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2478
2479 #[test]
2480 fn default_header_v2() {
2481 let header = QcowHeader::create_for_size_and_path(2, 0x10_0000, None);
2482 let mut disk_file: RawFile = RawFile::new(TempFile::new().unwrap().into_file(), false);
2483 header
2484 .expect("Failed to create header.")
2485 .write_to(&mut disk_file)
2486 .expect("Failed to write header to temporary file.");
2487 disk_file.rewind().unwrap();
2488 QcowFile::from(disk_file).expect("Failed to create Qcow from default Header");
2489 }
2490
2491 #[test]
2492 fn default_header_v3() {

Callers

nothing calls this directly

Calls 2

newFunction · 0.85
write_toMethod · 0.45

Tested by

no test coverage detected