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

Function default_header_v3

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

Source from the content-addressed store, hash-verified

2490
2491 #[test]
2492 fn default_header_v3() {
2493 let header = QcowHeader::create_for_size_and_path(3, 0x10_0000, None);
2494 let mut disk_file: RawFile = RawFile::new(TempFile::new().unwrap().into_file(), false);
2495 header
2496 .expect("Failed to create header.")
2497 .write_to(&mut disk_file)
2498 .expect("Failed to write header to temporary file.");
2499 disk_file.rewind().unwrap();
2500 QcowFile::from(disk_file).expect("Failed to create Qcow from default Header");
2501 }
2502
2503 #[test]
2504 fn header_read() {

Callers

nothing calls this directly

Calls 2

newFunction · 0.85
write_toMethod · 0.45

Tested by

no test coverage detected