Skip to content

Commit ec70ea3

Browse files
authored
Unrolled build for #158563
Rollup merge of #158563 - PaulDance:patches/fix-win7-hostname_smoketest, r=JohnTitor Test(lib/net): Fix `hostname_smoketest` for Win7 This test currently fails under both x86 and x86_64 Win7 on: ``` thread 'net::tests::hostname_smoketest' (2304) panicked at library/std/src/net/tests.rs:46:14: called `Result::unwrap()` on an `Err` value: Error { kind: Unsupported, message: "operation not supported on this platform" } ``` This is simply because the feature was made to be effectively disabled under these targets in #150905. The test is therefore fixed in order to reflect that appropriately. cc #135142 @roblabla @rustbot label O-windows-7 O-x86_32 O-x86_64 A-io T-libs
2 parents 5165714 + 3ace8f4 commit ec70ea3

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

library/std/src/net/tests.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@ pub fn compare_ignore_zoneid(a: &SocketAddr, b: &SocketAddr) -> bool {
4141
fn hostname_smoketest() {
4242
// Just a smoke test to ensure it can be called.
4343
let name = crate::net::hostname();
44-
if cfg!(windows) || cfg!(unix) {
44+
if cfg!(any(all(windows, not(target_vendor = "win7")), unix)) {
4545
// At least on Windows and Unix, this should succeed.
46+
// The `win7` Windows targets do not support it yet though.
4647
name.unwrap();
4748
}
4849
}

0 commit comments

Comments
 (0)