-
-
Notifications
You must be signed in to change notification settings - Fork 170
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
Conversation
ca3266b
to
e24e342
Compare
6c758f5
to
ff20426
Compare
FYI: I wouldn't count on interrupt status returning anything useful. I'm actually somewhat surprised to find this in the SNP spec (without much details what the expected behavior is). UEFI does not use interrupts (except timer) and handles devices in polling mode. So there is little reason for uefi drivers to configure device interrupt registers in the first place. |
ad4b06f
to
2c881ba
Compare
c7082b8
to
154b691
Compare
I gave it another shot. I know that this doesn't change any of the underlying problems of the test (#1617), but I hope this helps the next person to not waste the same amount of hours in the test as I did. |
92ef5c0
to
d71d5dc
Compare
This helps to identify the network interface in integration tests.
Although the changes look big, most things were just reordered (moved out of the loop body) and decoupled. The function finding the proper handle verifies the interface has the right MAC, to prevent failure and ease debugging.
snp::test() can now be called multiple times in a row
The new function makes debugging of unexpected packages (e.g. ARP) much easier detectable.
Properly deconstruct the response. This improves the maintainability of this test and to better understand what is going on.
We still have the unfortunate situation that the SNP test depends on DHCP of the PXE test, but now it is much clearer how the UDP packet is sent via Ethernet and how the echo service is used.
TL;DR: This adds more clarity to facilitate future debugging and improvements for #1617.
Wow, working on #1617 was an unexpected major time sink. The problem is that if
snp::test
runs beforepxe::test
,snp.receive()
receives an Ethernet ARP package rather than a Ethernet IPv4 packet.I tried two solutions:
I've got none of the approaches to work, unfortunately. So instead, this adds more clarity to ease future debugging and improvements. Relates to #1617 opened by @kraxel.
Steps to Undraft
Checklist