Lines Matching refs:off
166 let off = 512; // Randomly selected offset. in test_multi_block_read() localVariable
172 let mut out = vec![0u8; blk_0[off..].len()]; in test_multi_block_read()
173 devs.get(0).unwrap().read(u64::try_from(off).unwrap(), &mut out[..]).unwrap(); in test_multi_block_read()
174 assert_eq!(out, blk_0[off..]); in test_multi_block_read()
176 let mut out = vec![0u8; blk_1[off..].len()]; in test_multi_block_read()
177 devs.get(1).unwrap().read(u64::try_from(off).unwrap(), &mut out[..]).unwrap(); in test_multi_block_read()
178 assert_eq!(out, blk_1[off..]); in test_multi_block_read()
183 let off = 512; // Randomly selected offset. in test_multi_block_write() localVariable
191 devs.get(0).unwrap().write(u64::try_from(off).unwrap(), &mut blk_0[off..]).unwrap(); in test_multi_block_write()
192 assert_eq!(blk_0[off..], devs.0[0].io.storage[off..]); in test_multi_block_write()
194 devs.get(1).unwrap().write(u64::try_from(off).unwrap(), &mut blk_1[off..]).unwrap(); in test_multi_block_write()
195 assert_eq!(blk_1[off..], devs.0[1].io.storage[off..]); in test_multi_block_write()
237 off: u64, in check_read_partition()
240 let expected = &part_data[off.try_into().unwrap()..]; in check_read_partition()
242 devs.read_gpt_partition(part, off, &mut out[..]).unwrap(); in check_read_partition()
248 let off = 512u64; // Randomly selected offset. in test_multi_block_gpt_read() localVariable
259 check_read_partition(&mut devs, "boot_a", off, expect_boot_a); in test_multi_block_gpt_read()
260 check_read_partition(&mut devs, "boot_b", off, expect_boot_b); in test_multi_block_gpt_read()
265 check_read_partition(&mut devs, "vendor_boot_a", off, expect_vendor_boot_a); in test_multi_block_gpt_read()
266 check_read_partition(&mut devs, "vendor_boot_b", off, expect_vendor_boot_b); in test_multi_block_gpt_read()
274 off: u64, in check_write_partition()
277 let to_write = &mut data[off.try_into().unwrap()..]; in check_write_partition()
280 devs.write_gpt_partition(part, off, to_write).unwrap(); in check_write_partition()
281 devs.read_gpt_partition(part, off, &mut out[..]).unwrap(); in check_write_partition()
285 devs.write_gpt_partition(part, off, to_write).unwrap(); in check_write_partition()
286 devs.read_gpt_partition(part, off, &mut out[..]).unwrap(); in check_write_partition()
292 let off = 512u64; // Randomly selected offset. in test_multi_block_gpt_write() localVariable
305 check_write_partition(&mut devs, "boot_a", off, expect_boot_a); in test_multi_block_gpt_write()
306 check_write_partition(&mut devs, "boot_b", off, expect_boot_b); in test_multi_block_gpt_write()
313 check_write_partition(&mut devs, "vendor_boot_a", off, expect_vendor_boot_a); in test_multi_block_gpt_write()
314 check_write_partition(&mut devs, "vendor_boot_b", off, expect_vendor_boot_b); in test_multi_block_gpt_write()