Subject: | Resolver issues with Ubuntu stock /etc/hosts when ::1 is listed as localhost |
Hi Paul,
Noticed a minor issue today on a fresh install for 0.35 under Ubuntu
32-bit 10.04, probably more of a config/setup thing than an actual bug.
Had a failing test in 50resolver.t where it couldn't find localhost
(additional output is a note explain $localhost_err and \@localhost_addr):
1..17
ok 1 - $loop->resolver isa IO::Async::Resolver
ok 2 - getpwuid
ok 3 - getpwuid via $loop->resolve
ok 4 - getpwnam
ok 5 - getprotobyname
ok 6 - getprotobynumber
#
# [
# {
# 'addr' => 'P',
# 'canonname' => undef,
# 'family' => 2,
# 'protocol' => 6,
# 'socktype' => 1
# },
# {
# 'addr' => 'P',
# 'canonname' => undef,
# 'family' => 2,
# 'protocol' => 6,
# 'socktype' => 1
# }
# ]
ok 7 - getaddrinfo_array - resolved
ok 8 - getaddrinfo_array - resolved addresses
ok 9 - getaddrinfo_hash - resolved
ok 10 - getaddrinfo_hash - resolved addresses
ok 11 - $resolver->getaddrinfo - resolved
ok 12 - $resolver->getaddrinfo - resolved addresses
ok 13 - $resolver->getaddrinfo on numeric host/service is synchronous
not ok 14 - $resolver->getaddrinfo resolved addressess synchronously
# Failed test '$resolver->getaddrinfo resolved addressess synchronously'
# at t/50resolver.t line 215.
# Structures begin differing at:
# $got->[1] = Does not exist
# $expected->[1] = HASH(0x8896108)
ok 15 - $resolver->getnameinfo - resolved
ok 16 - $resolver->getnameinfo - resolved names
ok 17 - $resolver->getnameinfo with flags=NI_NUMERICHOST|NI_NUMERICSERV
is synchronous
# Looks like you failed 1 test of 17.
/etc/hosts had the following for localhost:
127.0.0.1 localhost.localdomain localhost
::1 localhost ip6-localhost ip6-loopback
and after removing the localhost entry for ::1 the test passed cleanly
(in case it matters, this was the stock Ubuntu perl version 5.10.1).
Tom