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

Function open_readonly

block/src/factory.rs:263–271  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

261
262 #[test]
263 fn open_readonly() {
264 let tmp = TempFile::new().unwrap();
265 tmp.as_file().set_len(1 << 20).unwrap();
266 let path = tmp.as_path().to_owned();
267 let mut options = default_options(&path);
268 options.readonly = true;
269 let opened = open_disk(&options).unwrap();
270 assert_eq!(opened.image_type, ImageType::Raw);
271 }
272
273 #[test]
274 fn sync_fallback_when_async_disabled() {

Callers

nothing calls this directly

Calls 4

newFunction · 0.85
default_optionsFunction · 0.85
open_diskFunction · 0.85
set_lenMethod · 0.45

Tested by

no test coverage detected