Skip to content

SNP Integration Test: Improve Clarity #1621

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Jun 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions uefi-test-runner/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ edition = "2024"
[dependencies]
uefi-raw = { path = "../uefi-raw" }
uefi = { path = "../uefi", features = ["alloc", "global_allocator", "panic_handler", "logger", "qemu", "log-debugcon"] }
smoltcp = { version = "0.12.0", default-features = false, features = ["medium-ethernet", "proto-ipv4", "socket-udp"] }

log.workspace = true

Expand Down
3 changes: 3 additions & 0 deletions uefi-test-runner/src/proto/network/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ pub fn test() {

http::test();
pxe::test();
// Currently, we are in the unfortunate situation that the SNP test
// depends on the PXE test, as it assigns an IPv4 address to the
// interface via DHCP.
snp::test();
}

Expand Down
7 changes: 5 additions & 2 deletions uefi-test-runner/src/proto/network/pxe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@ pub fn test() {

assert!(base_code.mode().dhcp_ack_received());
let dhcp_ack: &DhcpV4Packet = base_code.mode().dhcp_ack().as_ref();
let server_ip = dhcp_ack.bootp_si_addr;
let server_ip = IpAddress::new_v4(server_ip);

info!("DHCP: Server IP: {:?}", dhcp_ack.bootp_si_addr);
info!("DHCP: Client IP: {:?}", dhcp_ack.bootp_yi_addr);

let server_ip = IpAddress::new_v4(dhcp_ack.bootp_si_addr);

const EXAMPLE_FILE_NAME: &[u8] = b"example-file.txt\0";
const EXAMPLE_FILE_CONTENT: &[u8] = b"Hello world!";
Expand Down
Loading
Loading