Skip to content

snp test is broken #1617

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

Open
kraxel opened this issue Apr 10, 2025 · 3 comments
Open

snp test is broken #1617

kraxel opened this issue Apr 10, 2025 · 3 comments

Comments

@kraxel
Copy link
Contributor

kraxel commented Apr 10, 2025

the snp test depends on the pxe test having configured the network beforehand, it does not work on its own.
swap the order of the tests ...

 pub fn test() {
     info!("Testing Network protocols");
 
-    pxe::test();
     snp::test();
+    pxe::test();
 }

... and watch it fail:

[PANIC]: panicked at uefi-test-runner/src/proto/network/snp.rs:112:9:
assertion `left == right` failed
  left: [0, 0, 0, 0, 0]
 right: [4, 4, 3, 2, 1]
Error: tests did not complete successfully
@phip1611
Copy link
Member

Oh, good catch! It shouldn't be like that; test runs should be idempotent

kraxel added a commit to kraxel/uefi-rs that referenced this issue Apr 10, 2025
With the switch to virtio-net we have networking on all platforms.
Turn on the pxe test everywhere.

Also serves as workaround for
rust-osdev#1617

Signed-off-by: Gerd Hoffmann <[email protected]>
phip1611 pushed a commit to kraxel/uefi-rs that referenced this issue Apr 10, 2025
With the switch to virtio-net we have networking on all platforms.
Turn on the pxe test everywhere.

Also serves as workaround for
rust-osdev#1617

Signed-off-by: Gerd Hoffmann <[email protected]>
@phip1611
Copy link
Member

Maan, I was spending way too much time on this. Here is what is happening:

  • PXE test assigns IPv4 to network interface
  • SNP test can send IPv4 packet

Otherwise, the SNP test receives an ARP packet instead of the IPv4 packet.

We have two options:

  • use DHCP in SNP test (meh, dislike)
  • send raw ethernet frame without IPv4 to ourselves (currently working on it, but not as simple as expected)

@phip1611
Copy link
Member

phip1611 commented Apr 15, 2025

I'm stopping the work on this. I've spent many hours into it, but I didn't get either way running reliably.

Didn't think that it is not possible to send a raw Ethernet frame to ourselves..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants