Update test for getprotobyname and getprotobynumber for inconsistant protocol 0 - #670
Merged
Merged
Conversation
…databases Depending on the system protocol 0 can be `ip` or `hopopt`. On Arch Linux it is `hopopt` while the former test here assumed it to always be `ip`
Greptile SummaryThis PR makes protocol-zero tests independent of whether the host names protocol 0
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains; the new test obtains the host-defined protocol-zero name dynamically and verifies that it resolves back to zero.
|
| Filename | Overview |
|---|---|
| tests/codegen/io/streams.rs | Replaces hard-coded protocol-zero naming expectations with a host-defined round-trip assertion, fully addressing the previous portability finding. |
Reviews (2): Last reviewed commit: "test: make protocol zero round-trip port..." | Re-trigger Greptile
Member
|
Given that this is a mere test fix, I'm gonna merge as is without further reviews. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depending on the system protocol 0 can be
iporhopopt. On Arch Linux it ishopoptwhile the former test here assumed it to always beipSo, this test would fail if run from an Arch Linux system.
Arch gets its protocol list for /etc/protocols from
https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xml
https://sources.archlinux.org/other/packages/iana-etc/protocol-numbers-20260310.xml
I've updated the tests here so it can still pass with
iporhopoptbeing protocol 0.