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

Function with_default_file

block/src/qcow/mod.rs:2437–2445  ·  view source on GitHub ↗
(file_size: u64, direct: bool, mut testfn: F)

Source from the content-addressed store, hash-verified

2435 }
2436
2437 fn with_default_file<F>(file_size: u64, direct: bool, mut testfn: F)
2438 where
2439 F: FnMut(QcowFile),
2440 {
2441 let tmp: RawFile = RawFile::new(TempFile::new().unwrap().into_file(), direct);
2442 let qcow_file = QcowFile::new(tmp, 3, file_size, true).unwrap();
2443
2444 testfn(qcow_file); // File closed when the function exits.
2445 }
2446
2447 #[test]
2448 fn write_read_start_backing_v2() {

Callers 5

resize_grow_within_l1Function · 0.85
resize_shrink_failsFunction · 0.85
combo_write_read_commonFunction · 0.85
seek_data_commonFunction · 0.85
seek_hole_commonFunction · 0.85

Calls 1

newFunction · 0.85

Tested by 2

resize_grow_within_l1Function · 0.68
resize_shrink_failsFunction · 0.68