uefi-rs/uefi-test-runner
Philipp Schuster 7182f97027 uefi: pxe: use core::net-types in public API
Please note that some structs that are low-level types and
UEFI-facing still use EfiIpAddr instead. This includes for
example

```rust
/// This struct contains optional parameters for [`BaseCode::discover`].
///
/// Corresponds to the `EFI_PXE_BASE_CODE_DISCOVER_INFO` type in the C API.
#[repr(C)]
#[derive(Debug, Pointee)]
pub struct DiscoverInfo {
    use_m_cast: bool,
    use_b_cast: bool,
    use_u_cast: bool,
    must_use_list: bool,
    server_m_cast_ip: EfiIpAddr,
    ip_cnt: u16,
    srv_list: [Server],
}
```

Once https://github.com/rust-osdev/uefi-rs/issues/1642 is resolved,
this can be improved.
2025-10-21 07:39:45 +02:00
..
examples test-runner: Add example of using the Input protocol 2025-09-03 14:20:12 -04:00
https Add CA trust database to the repo. 2025-04-18 12:12:23 -04:00
screenshots Validate GOP test output with screenshots (#37) 2018-09-23 19:17:13 +02:00
src uefi: pxe: use core::net-types in public API 2025-10-21 07:39:45 +02:00
tftp Add PXE Base Code protocol (#417) 2022-05-07 18:13:09 +03:00
.gitignore Add support for AArch64 to uefi-test-runner 2020-07-03 16:25:40 +03:00
Cargo.toml uefi-test-runner: SNP: use smoltcp to UDP packet 2025-05-31 19:59:10 +02:00
README.md readme: Replace BUILDING.md link with tutorial link 2022-11-27 14:24:18 -05:00

uefi-test-runner

This package is a UEFI application for running tests. It is intended to be run in a specially-configured QEMU VM. This allows us to test the parts of the uefi package that depend on a UEFI environment, such as various boot services and protocols.

Requirements

  • QEMU: the most recent version of QEMU is recommended.
  • Python 3: at least version 3.6 is required.
  • OVMF: You need to extract the firmware files into the uefi-test-runner directory.
    • For x86_64: OVMF_CODE.fd and OVMF_VARS.fd
    • For AArch64: QEMU_EFI-pflash.raw and vars-template-pflash.raw Alternatively, install OVMF using your distro's package manager and change the paths in the script file. Note: if your distro's OVMF version is too old / does not provide these files, you can download Gerd Hoffmann's builds and extract them in the local directory.

Build and run in QEMU

Use cargo xtask run to build uefi-test-runner and run it in QEMU. See the top-level README for more details of cargo xtask.