Skip to content

Test(lib/win/net): Skip UDS tests when under Win7#152534

Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
PaulDance:patches/remove-win7-uds
Feb 15, 2026
Merged

Test(lib/win/net): Skip UDS tests when under Win7#152534
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
PaulDance:patches/remove-win7-uds

Conversation

@PaulDance
Copy link
Contributor

@PaulDance PaulDance commented Feb 12, 2026

Unix Domain Socket support has only been added to Windows since Windows 10 Insider Preview Build 17063. Thus, it has no chance of ever being supported under Windows 7, making current tests fail. This therefore adds the necessary in order to make the tests dynamically skip when run under Windows 7, 8, and early 10, as it does not trigger linker errors.

cc #150487 @roblabla

@rustbot label T-libs A-io O-windows-7

@rustbot rustbot added O-windows Operating system: Windows S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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` O-windows-7 OS: Windows 7 or Windows Server 2008 R2 or etc. labels Feb 12, 2026
@PaulDance PaulDance marked this pull request as ready for review February 12, 2026 14:28
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 12, 2026
@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Feb 12, 2026
@rustbot
Copy link
Collaborator

rustbot commented Feb 12, 2026

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @ChrisDenton, libs
  • @ChrisDenton, libs expanded to 8 candidates

@roblabla
Copy link
Contributor

Does this just disable the whole module? If so, I don't think that's the right way to go - The win7 target lowers the minimum supported windows version, but it shouldn't cfg out entire standard APIs, especially since some people might still want to use those APIs when running on a newer version of windows.

As far as I can tell, the UDS feature doesn't even cause any link-time error (since it uses existing functions with new parameters), so the only thing we really need to do is add some version checking in the test code to ignore the test when running on a win7 machine.

@PaulDance
Copy link
Contributor Author

Ah, you're right, I went a bit too quick there. Will do, then.

@PaulDance PaulDance marked this pull request as draft February 12, 2026 23:14
@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 12, 2026
Unix Domain Socket support has only been added to Windows since Windows
10 Insider Preview Build 17063. Thus, it has no chance of ever being
supported under Windows 7, making current tests fail. This therefore
adds the necessary in order to make the tests dynamically skip when run
under Windows 7, 8, and early 10, as it does not trigger linker errors.

Signed-off-by: Paul Mabileau <paul.mabileau@harfanglab.fr>
@PaulDance PaulDance force-pushed the patches/remove-win7-uds branch from bc65b8e to c22301b Compare February 14, 2026 01:32
@PaulDance PaulDance changed the title Fix(lib/win/net): Strip UDS away under Win7 Test(lib/win/net): Skip UDS tests when under Win7 Feb 14, 2026
@PaulDance PaulDance marked this pull request as ready for review February 14, 2026 01:40
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 14, 2026
}

/// Returns true if we are currently running on Windows 10 v1803 (RS4) or greater.
fn is_windows_10_v1803_or_greater() -> bool {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, it seems a bit surprising to me that this is the first time we have code of this shape. I guess it seems fine to add it here for now (vs., e.g., in std::os::windows or something like that).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I had searched for instances of RtlVerifyVersionInfo or RtlGetVersion, but couldn't find any yet. The platform version API did not seem to go beyond macOS for now from what I had seen, so adding its Windows variant seemed like a bit much for the intended fix.

@Mark-Simulacrum
Copy link
Member

@bors r+

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 14, 2026

📌 Commit c22301b has been approved by Mark-Simulacrum

It is now in the queue for this repository.

@rust-bors rust-bors bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 14, 2026
rust-bors bot pushed a commit that referenced this pull request Feb 15, 2026
Rollup of 9 pull requests

Successful merges:

 - #150424 (diagnostics: add note when param-env shadows global impl)
 - #152132 (implement `carryless_mul`)
 - #152508 (Improve write! and writeln! error when called without destination)
 - #152534 (Test(lib/win/net): Skip UDS tests when under Win7)
 - #152578 (ci: Lock cross toolchain version and update docs)
 - #152188 (Include `library/stdarch` for `CURRENT_RUSTC_VERSION` updates)
 - #152402 (Add regression test for #141738)
 - #152472 (unwind/wasm: fix compile error by wrapping wasm_throw in unsafe block)
 - #152610 (Exchange js_lint message between bless and non-bless)
@rust-bors rust-bors bot merged commit 3ce7fb6 into rust-lang:main Feb 15, 2026
11 checks passed
@rustbot rustbot added this to the 1.95.0 milestone Feb 15, 2026
rust-timer added a commit that referenced this pull request Feb 15, 2026
Rollup merge of #152534 - PaulDance:patches/remove-win7-uds, r=Mark-Simulacrum

Test(lib/win/net): Skip UDS tests when under Win7

Unix Domain Socket support has only been added to Windows since Windows 10 Insider Preview Build 17063. Thus, it has no chance of ever being supported under Windows 7, making current tests fail. This therefore adds the necessary in order to make the tests dynamically skip when run under Windows 7, 8, and early 10, as it does not trigger linker errors.

cc #150487 @roblabla

@rustbot label T-libs A-io O-windows-7
@PaulDance PaulDance deleted the patches/remove-win7-uds branch February 15, 2026 17:40
@PaulDance
Copy link
Contributor Author

👍

github-actions bot pushed a commit to rust-lang/stdarch that referenced this pull request Feb 16, 2026
Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#150424 (diagnostics: add note when param-env shadows global impl)
 - rust-lang/rust#152132 (implement `carryless_mul`)
 - rust-lang/rust#152508 (Improve write! and writeln! error when called without destination)
 - rust-lang/rust#152534 (Test(lib/win/net): Skip UDS tests when under Win7)
 - rust-lang/rust#152578 (ci: Lock cross toolchain version and update docs)
 - rust-lang/rust#152188 (Include `library/stdarch` for `CURRENT_RUSTC_VERSION` updates)
 - rust-lang/rust#152402 (Add regression test for rust-lang/rust#141738)
 - rust-lang/rust#152472 (unwind/wasm: fix compile error by wrapping wasm_throw in unsafe block)
 - rust-lang/rust#152610 (Exchange js_lint message between bless and non-bless)
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` O-windows Operating system: Windows O-windows-7 OS: Windows 7 or Windows Server 2008 R2 or etc. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants