wininet: let automated testers force all DNS lookups to return localhost

Dan Kegel dank at
Sun Nov 2 12:58:11 CST 2008

Rob wrote:

>> Later we should provide a script to set up
>> a local test server that can handle all of
>> our conformance tests' requests, but for
>> now, just letting patchwatcher or winetest
>> redirect everything to localhost will let tests
>> fail reliably instead of randomly.
> This approach won't help users of the Wine conformance
> tests running on Windows,

Sure it would; just make the test server setup script run on cygwin properly.

> We should instead rewrite any existing tests that
> use a public server to instead use a server started
> by the Wine test code (see dlls/wininet/tests/http.c:server_thread).

Yes, absolutely.  The more tests that set up their own mock servers, the better.

But while we're waiting for that, a "nuke DNS resolution"
approach makes tests behave repeatably, and would
even be useful after we implement the fix you propose,
as it would protect us from new tests that sloppily depend on
the public internet.

As someone pointed out, actually nuking DNS resolution
is kind of tricky; my patch did it for DLLs that use win32
networking, but not for DLLs that use native networking.
It probably can't be done the same way everywhere,
so I guess for Linux I'll punt and try shared library overriding.
- Dan

More information about the wine-devel mailing list