Create a QCOW2 image with `num_clusters` allocated clusters opened via QcowDisk with synchronous backend.
(num_clusters: usize)
| 53 | /// Create a QCOW2 image with `num_clusters` allocated clusters opened |
| 54 | /// via QcowDisk with synchronous backend. |
| 55 | pub fn qcow_tempfile(num_clusters: usize) -> (TempFile, QcowDisk) { |
| 56 | let tmp = create_qcow_tempfile(num_clusters); |
| 57 | let disk = QcowDisk::new( |
| 58 | tmp.as_file().try_clone().unwrap(), |
| 59 | false, |
| 60 | false, |
| 61 | true, |
| 62 | false, |
| 63 | ) |
| 64 | .expect("failed to open QCOW2 via QcowDisk"); |
| 65 | (tmp, disk) |
| 66 | } |
| 67 | |
| 68 | /// Create a QCOW2 image with `num_clusters` allocated clusters opened |
| 69 | /// via QcowDisk with io_uring backend. |
no test coverage detected