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

Function enumeration_respects_window

vmm/src/memory_manager.rs:3414–3420  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3412
3413 #[test]
3414 fn enumeration_respects_window() {
3415 let f = make_memfd(4096 * 16);
3416 // Fully populate the file, then leave it as one big data extent.
3417 f.write_all_at(&vec![0xEEu8; 4096 * 16], 0).unwrap();
3418 let extents = collect_extents(f.as_fd(), 4096 * 4, 4096 * 8).unwrap();
3419 assert_eq!(extents, vec![(4096 * 4, 4096 * 4)]);
3420 }
3421
3422 #[test]
3423 fn dense_file_yields_single_extent() {

Callers

nothing calls this directly

Calls 3

make_memfdFunction · 0.85
collect_extentsFunction · 0.85
as_fdMethod · 0.45

Tested by

no test coverage detected