Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 70a63b8

Browse files
Merge pull request #1621 from rust-osdev/snp-test
SNP Integration Test: Improve Clarity
2 parents 462de06 + 507ed36 commit 70a63b8

File tree

6 files changed

+290
-115
lines changed

6 files changed

+290
-115
lines changed

‎Cargo.lock

Lines changed: 45 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎uefi-test-runner/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ edition = "2024"
88
[dependencies]
99
uefi-raw = { path = "../uefi-raw" }
1010
uefi = { path = "../uefi", features = ["alloc", "global_allocator", "panic_handler", "logger", "qemu", "log-debugcon"] }
11+
smoltcp = { version = "0.12.0", default-features = false, features = ["medium-ethernet", "proto-ipv4", "socket-udp"] }
1112

1213
log.workspace = true
1314

‎uefi-test-runner/src/proto/network/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ pub fn test() {
55

66
http::test();
77
pxe::test();
8+
// Currently, we are in the unfortunate situation that the SNP test
9+
// depends on the PXE test, as it assigns an IPv4 address to the
10+
// interface via DHCP.
811
snp::test();
912
}
1013

‎uefi-test-runner/src/proto/network/pxe.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,11 @@ pub fn test() {
2626

2727
assert!(base_code.mode().dhcp_ack_received());
2828
let dhcp_ack: &DhcpV4Packet = base_code.mode().dhcp_ack().as_ref();
29-
let server_ip = dhcp_ack.bootp_si_addr;
30-
let server_ip = IpAddress::new_v4(server_ip);
29+
30+
info!("DHCP: Server IP: {:?}", dhcp_ack.bootp_si_addr);
31+
info!("DHCP: Client IP: {:?}", dhcp_ack.bootp_yi_addr);
32+
33+
let server_ip = IpAddress::new_v4(dhcp_ack.bootp_si_addr);
3134

3235
const EXAMPLE_FILE_NAME: &[u8] = b"example-file.txt0円";
3336
const EXAMPLE_FILE_CONTENT: &[u8] = b"Hello world!";

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /