<herd>Perl</herd> This will also occur if you have the following setup. 1: A dns record with a wildcard in it ie: *.foo.bar => 192.157.1.1 2. A default DNS search of 'foo.bar'. In this configuration, non-fully-qualified domains result in a fallback, so wango.nonexistent.xx-only-testing expands as wango.nonexistent.xx-only-testing.foo.bar ,which then matches the wildcard record, resolving the IP. The solution is straightforward, but little known. All one has to do is put a '.' at the right hand end of the domain name to mark it a "fully qualified" so that search path resolution doesn't happen. I have a working patch for the test suite that I have submitted to upstream for review. t/back_ok.t ............. 8/11 # Failed test 'sanity check: we can't load NONEXISTENT.html' # at t/back_ok.t line 52. t/back_ok.t ............. 9/11 # Failed test 'Fails to get nonexistent URI and reports failure' # at t/back_ok.t line 59. # STDOUT is: # ok 1 - Try to get bad URL # # not: # not ok 1 - Try to get bad URL # # as expected # STDERR is: # # not: # /#\s+Failed\ test.*?\n?.*?at\ t\/back_ok\.t line 58.*\n?/ # # # 500 # # # Can't connect to wango.nonexistent.xx-only-testing:80 (Bad hostname 'wango.nonexistent.xx-only-testing') # # as expected # Failed test 'And the result should be false' # at t/back_ok.t line 62. t/back_ok.t ............. Failed 3/11 subtests t/click_ok.t ............ 1/? bind to *:13432: Address already in use at t/click_ok.t line 17 t/click_ok.t ............ ok t/content_contains.t .... 1/5 bind to *:13432: Address already in use at t/content_contains.t line 16 t/content_contains.t .... ok t/content_lacks.t ....... 1/5 bind to *:13432: Address already in use at t/content_lacks.t line 16 t/content_lacks.t ....... ok t/follow_link_ok.t ...... 1/5 bind to *:13432: Address already in use at t/follow_link_ok.t line 16 t/follow_link_ok.t ...... ok t/followable_links.t .... 1/3 bind to *:13432: Address already in use at t/followable_links.t line 16 t/followable_links.t .... ok t/get_ok-parms.t ........ ok t/get_ok.t .............. 1/11 bind to *:13432: Address already in use at t/get_ok.t line 26 t/get_ok.t .............. 8/11 # Failed test 'sanity check: we can't load NONEXISTENT.html' # at t/get_ok.t line 53. t/get_ok.t .............. 9/11 # Failed test 'Fails to get nonexistent URI and reports failure' # at t/get_ok.t line 60. # STDOUT is: # ok 1 - Try to get bad URL # # not: # not ok 1 - Try to get bad URL # # as expected # STDERR is: # # not: # /#\s+Failed\ test.*?\n?.*?at\ t\/get_ok\.t line 59.*\n?/ # # # 500 # # # Can't connect to wango.nonexistent.xx-only-testing:80 (Bad hostname 'wango.nonexistent.xx-only-testing') # # as expected # Failed test 'And the result should be false' # at t/get_ok.t line 63. t/get_ok.t .............. Failed 3/11 subtests t/has_tag.t ............. 1/7 bind to *:13432: Address already in use at t/has_tag.t line 16 t/has_tag.t ............. ok t/head_ok-parms.t ....... ok t/head_ok.t ............. 1/11 bind to *:13432: Address already in use at t/head_ok.t line 25 t/head_ok.t ............. 8/11 # Failed test 'sanity check: we can't load NONEXISTENT.html' # at t/head_ok.t line 52. t/head_ok.t ............. 9/11 # Failed test 'Fails to HEAD nonexistent URI and reports failure' # at t/head_ok.t line 59. # STDOUT is: # ok 1 - Try to HEAD bad URL # # not: # not ok 1 - Try to HEAD bad URL # # as expected # STDERR is: # # not: # /#\s+Failed\ test.*?\n?.*?at\ t\/head_ok\.t line 58.*\n?/ # # # 500 # # # Can't connect to wango.nonexistent.xx-only-testing:80 (Bad hostname 'wango.nonexistent.xx-only-testing') # # as expected # Failed test 'And the result should be false' # at t/head_ok.t line 62.
Created attachment 239333 [details, diff] DNS Resolution patch.
Created attachment 239373 [details] dev-perl/Test-WWW-Mechanize/Test-WWW-Mechanize-1.30.ebuild Patched ( barely ) ebuild that passes all tests on my machine.
This bug is resolved for me in WWW-Mechanize 1.66 with the smarter test code. Marked as WORKSFORME.
Er, Ignore that last one, the problem is still there, I'm just stupid. I had the same issue with WWW::Mechanize and I didn't see completely.
I've disabled the tests in 1.320.0. Tests were failing for me in contrast to the "Fixed in TWM 1.31_01" message of URL :/
(In reply to comment #5) > I've disabled the tests in 1.320.0. I've enable the tests in 1.400.0 again.
Should be fine now with last stable (1.730.0)