Skip to content
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

non-obvious choices in std IPv6 test creation #138328

Open
workingjubilee opened this issue Mar 11, 2025 · 1 comment
Open

non-obvious choices in std IPv6 test creation #138328

workingjubilee opened this issue Mar 11, 2025 · 1 comment
Labels
A-io Area: `std::io`, `std::fs`, `std::net` and `std::path` A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Comments

@workingjubilee
Copy link
Member

workingjubilee commented Mar 11, 2025

re: https://github.com/rust-lang/rust/blob/9fb94b32df38073bf63d009df77ed10cb1c989d0/library/std/src/net/udp/tests.rs

We make a bunch of devices with a scope_id of 0, but the value of 0 is a reserved scope_id. I believe it's usually ignored or treated as equivalent to "eh whatever", but we probably should be making them with scope_id: 1, i.e. "entirely local to here". This prompted #137967 because AIX helpfully fixes the value of scope_id to the one it interprets it as: 1.

@workingjubilee workingjubilee added A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug. labels Mar 11, 2025
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Mar 11, 2025
@workingjubilee workingjubilee added T-libs Relevant to the library team, which will review and decide on the PR/issue. A-io Area: `std::io`, `std::fs`, `std::net` and `std::path` and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Mar 11, 2025
@bjorn3
Copy link
Member

bjorn3 commented Mar 11, 2025

When parsing a string like ::1 we also use scope id 0 when there is no explicit scope id specified:

let scope_id = p.read_scope_id().unwrap_or(0);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-io Area: `std::io`, `std::fs`, `std::net` and `std::path` A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants