net: dnsclient_unix_test.go will fail on a machine with 'test' in /etc/hosts and 'files' first in nsswitch.conf #19592
Labels
FrozenDueToAge
Testing
An issue that has been verified to require only test changes, not just a test failure.
Milestone
What version of Go are you using (
go version
)?This issue reproduces when building the current git tip version of go, b9f6b22. Because it blocks finishing the build, I cannot show you literal 'go version' output on the affected machine. Testing says that this was introduced in commit bfc164c, 'net: add Resolver.StrictErrors', intended to fix issue #17448.
What operating system and processor architecture are you using (
go env
)?This also reproduces on FreeBSD.
What did you do?
Configure a machine with an /etc/hosts entry for the name
test
, such as:Then set
/etc/nsswitch.conf
to havehosts: files dns
, so that/etc/hosts
is checked before DNS. Then attempt to build go from source.What did you expect to see?
Build succeeds.
What did you see instead?
The build fails in
dnsclient_unix_test.go
where a whole bunch of DNS tests expect to get various errors or results when looking up the name 'test' but instead get thetest
entry from/etc/hosts
.The text was updated successfully, but these errors were encountered: