On Tue Feb 28 14:16:28 2017, SREZIC wrote:
Show quoted text> On 2016-07-31 13:50:08, SREZIC wrote:
> > If /etc/resolv.conf lists IPv4 and IPv6 nameservers, then
> > t/04_nameservers.t fails. On my system (debian jessie) it looks like
> > this:
> >
> > ...
> > # Running tests with the following nameservers:
> > # (three IPv4 addresses listed)
> > # (three IPv6 addresses listed)
> > Use of uninitialized value in numeric eq (==) at /tmpfs/.cpan-build-
> > cpansand/2016073115/POE-Component-Client-DNS-Recursive-1.08-
> > 3/blib/lib/POE/Component/Client/DNS/Recursive.pm line 139.
> > # Network is unreachable
> > # Looks like you planned 5 tests but ran 3.
> > t/04_nameservers.t ........
> > Dubious, test returned 255 (wstat 65280, 0xff00)
> > Failed 2/5 subtests
> > ...
>
> Same problem with 1.10, it seems.
This is annoying because it works fine in my environment where I have both ipv4 and ipv6 DNS servers.
1.10 had some extra debugging code to see which address was giving the "Network is unreachable" error.
I have now split the test into two tests, one testing ipv4 nameservers and the other ipv6 nameservers.
In my environment:
$ prove -Ilib t/04_ns_ipv*
t/04_ns_ipv4.t ..
1..5
# Running tests with the following nameservers:
# 192.168.1.252
# 192.168.1.7
# 192.168.1.6
ok 1 - Child create
ok 2 - Child lose
ok 3 - An object of class 'Net::DNS::Packet' isa 'Net::DNS::Packet'
ok 4 - We got answers
ok 5 - Reference has gone
ok
t/04_ns_ipv6.t ..
1..5
# Running tests with the following nameservers:
# 2001:470:6b9e:beef::e0e0
# 2001:470:6b9e:beef::b0b0
# 2001:470:6b9e:beef::c0c0
ok 1 - Child create
ok 2 - Child lose
ok 3 - An object of class 'Net::DNS::Packet' isa 'Net::DNS::Packet'
ok 4 - We got answers
ok 5 - Reference has gone
ok
All tests successful.
Files=2, Tests=10, 6 wallclock secs ( 0.04 usr 0.02 sys + 0.58 cusr 0.09 csys = 0.73 CPU)
Result: PASS
And is okay with only ipv6 DNS servers too:
$ prove -Ilib t/04_ns_ipv*
t/04_ns_ipv4.t ..
1..0 # SKIP Could not determine a local nameserver to query
skipped: Could not determine a local nameserver to query
t/04_ns_ipv6.t ..
1..5
# Running tests with the following nameservers:
# 2001:470:6b9e:beef::e0e0
# 2001:470:6b9e:beef::b0b0
# 2001:470:6b9e:beef::c0c0
ok 1 - Child create
ok 2 - Child lose
ok 3 - An object of class 'Net::DNS::Packet' isa 'Net::DNS::Packet'
ok 4 - We got answers
ok 5 - Reference has gone
ok
All tests successful.
Files=2, Tests=5, 1 wallclock secs ( 0.05 usr 0.01 sys + 0.59 cusr 0.04 csys = 0.69 CPU)
Result: PASS
I'll ship 1.12 and we'll see what we see.