HostResolverImplDnsTest.DnsTask failing reliably when run with one other test on Mac |
||
Issue descriptionChrome Version : 44fc2421eccfc4c19bd0c212fdcfe4fc8cdf4c08 / p493972 (landed 8/12) OS Version: OS X 10.12.6 What steps will reproduce the problem? 1. Build net_unittests on mac at the above versions 2. Run "net_unittests --gtest_filter=HostResolverImplDnsTest.LocalhostLookupWithHosts:HostResolverImplDnsTest.DnsTask" What is the expected result? Both tests pass. What happens instead of that? The second test fails. Note that if run by itself, it passes. Please provide any additional information below. Attach a screenshot if possible. UserAgentString: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.49 Safari/537.36 cd ../../; ninja -C out/Default -j 100 net_unittests && out/Default/net_unittests --gtest_filter=HostResolverImplDnsTest.LocalhostLookupWithHosts:HostResolverImplDnsTest.DnsTask ninja: Entering directory `out/Default' ninja: no work to do. IMPORTANT DEBUGGING NOTE: batches of tests are run inside their own process. For debugging a test inside a debugger, use the --gtest_filter=<your_test_name> flag along with --single-process-tests. Using sharding settings from environment. This is shard 0/1 Using 1 parallel jobs. Note: Google Test filter = HostResolverImplDnsTest.LocalhostLookupWithHosts:HostResolverImplDnsTest.DnsTask [==========] Running 2 tests from 1 test case. [----------] Global test environment set-up. [----------] 2 tests from HostResolverImplDnsTest [ RUN ] HostResolverImplDnsTest.LocalhostLookupWithHosts [ OK ] HostResolverImplDnsTest.LocalhostLookupWithHosts (1 ms) [ RUN ] HostResolverImplDnsTest.DnsTask ../../net/dns/host_resolver_impl_unittest.cc:1751: Failure Value of: requests_[0]->WaitForResult() Expected: net::ERR_NAME_NOT_RESOLVED Actual: 0, net::OK [ FAILED ] HostResolverImplDnsTest.DnsTask (2 ms) [----------] 2 tests from HostResolverImplDnsTest (3 ms total) [----------] Global test environment tear-down [==========] 2 tests from 1 test case ran. (4 ms total) [ PASSED ] 1 test. [ FAILED ] 1 test, listed below: [ FAILED ] HostResolverImplDnsTest.DnsTask Happy to do more investigation or reproduction on the machine this is happening on if desired.
,
Aug 23 2017
Awesome that it happens on linux too; I figured I'd be playing remote keyboard controller for you :-}. Regardless, grab me if I can be useful.
,
Aug 23 2017
The test causing the interference was added recently in https://chromium-review.googlesource.com/c/chromium/src/+/598068, and in fact it doesn't clean up its DnsConfig change properly, but a lot of the other tests in that file do the same thing and just happen to run in the right order, which isn't ideal. I'll fix it.
,
Aug 23 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/17acdf093f43f6ed0262437a0da7ec0bb2576a6b commit 17acdf093f43f6ed0262437a0da7ec0bb2576a6b Author: Miriam Gershenson <mgersh@chromium.org> Date: Wed Aug 23 19:43:08 2017 Clean up DnsConfig after HostResolverImplDnsTest HostResolverImplDnsTest.DnsTask failed when run after HostResolverImplTest.LocalhostLookupWithHosts, which was added in crrev.com/c/598068. LocalhostLookupWithHosts changes the DnsConfig, and then DnsTask assumes that it starts with no valid DnsConfig available. The setup that creates a DnsClient with an empty DnsConfig isn't sufficient to ensure this because when HostResolverImpl gets a new DnsClient with an empty DnsConfig, it'll check with NetworkChangeNotifier to see if there's a nonempty one. This issue isn't unique to the new test. Lots of the other tests in the file do the same thing, and just happen to be ordered correctly in the file so they don't interfere with each other in practice. Fix that by resetting the DnsConfig in TearDown(). BUG= 758242 Change-Id: Ibc78b5e58975ba38362214812a309471a82f2c57 Reviewed-on: https://chromium-review.googlesource.com/628961 Reviewed-by: Randy Smith <rdsmith@chromium.org> Commit-Queue: Miriam Gershenson <mgersh@chromium.org> Cr-Commit-Position: refs/heads/master@{#496771} [modify] https://crrev.com/17acdf093f43f6ed0262437a0da7ec0bb2576a6b/net/dns/host_resolver_impl_unittest.cc
,
Aug 23 2017
|
||
►
Sign in to add a comment |
||
Comment 1 by mge...@chromium.org
, Aug 23 2017Owner: mge...@chromium.org
Status: Assigned (was: Unconfirmed)