Skip to content

Commit f707849

Browse files
test-runner: Add test for boot::locate_device_path
1 parent 1510b08 commit f707849

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

uefi-test-runner/src/proto/device_path.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
use alloc::string::ToString;
22
use alloc::vec::Vec;
3+
use uefi::boot;
34
use uefi::prelude::*;
45
use uefi::proto::device_path::text::*;
56
use uefi::proto::device_path::{DevicePath, LoadedImageDevicePath};
67
use uefi::proto::loaded_image::LoadedImage;
8+
use uefi::proto::media::disk::DiskIo;
79

810
pub fn test(bt: &BootServices) {
911
info!("Running device path protocol test");
@@ -64,6 +66,10 @@ pub fn test(bt: &BootServices) {
6466
{
6567
assert_eq!(n1, n2);
6668
}
69+
70+
// Test `locate_device_path`.
71+
let mut dp = &*device_path;
72+
boot::locate_device_path::<DiskIo>(&mut dp).unwrap();
6773
}
6874

6975
// test 2/2: test high-level to-string api

0 commit comments

Comments
 (0)