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

Function no_backing_file

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

Source from the content-addressed store, hash-verified

2670
2671 #[test]
2672 fn no_backing_file() {
2673 // `backing_file` is `None`
2674 let header = QcowHeader::create_for_size_and_path(3, 0x10_0000, None)
2675 .expect("Failed to create header.");
2676 let mut disk_file: RawFile = RawFile::new(TempFile::new().unwrap().into_file(), false);
2677 header
2678 .write_to(&mut disk_file)
2679 .expect("Failed to write header to shm.");
2680 disk_file.rewind().unwrap();
2681 // The maximum nesting depth is 0, which means backing file is not allowed.
2682 QcowFile::from_with_nesting_depth(disk_file, 0, true).unwrap();
2683 }
2684
2685 #[test]
2686 fn disable_backing_file() {

Callers

nothing calls this directly

Calls 2

newFunction · 0.85
write_toMethod · 0.45

Tested by

no test coverage detected