Merge pull request #152 from Makto94/fix/net-test-win10
net: skip newer-Windows-only exports in only_loopback_is_reachable
This commit is contained in:
1 file changed
+10
-6
@@ -1048,18 +1048,22 @@ mod tests {
|
|||||||
named.name
|
named.name
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
// Every override names a real export of its DLL.
|
// Every override names a real export of its DLL. Some exports only
|
||||||
|
// exist on newer Windows (WinHttpGetProxySettingsEx is absent from
|
||||||
|
// Windows 10's winhttp.dll); the HLE supplies those itself, so skip
|
||||||
|
// them only when the host really lacks them.
|
||||||
|
const NEWER_WINDOWS_ONLY: &[&str] = &["WinHttpGetProxySettingsEx"];
|
||||||
for e in m.exports.iter().filter(|e| !e.name.starts_with('#')) {
|
for e in m.exports.iter().filter(|e| !e.name.starts_with('#')) {
|
||||||
let dll = if e.name.starts_with("WinHttp") {
|
let dll = if e.name.starts_with("WinHttp") {
|
||||||
"winhttp.dll"
|
"winhttp.dll"
|
||||||
} else {
|
} else {
|
||||||
"ws2_32.dll"
|
"ws2_32.dll"
|
||||||
};
|
};
|
||||||
assert!(
|
let present = crate::host::function(dll, e.name).is_some();
|
||||||
crate::host::function(dll, e.name).is_some(),
|
if !present && NEWER_WINDOWS_ONLY.contains(&e.name) {
|
||||||
"{dll} lacks {}",
|
continue;
|
||||||
e.name
|
}
|
||||||
);
|
assert!(present, "{dll} lacks {}", e.name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user