clusterssh icon indicating copy to clipboard operation
clusterssh copied to clipboard

t/10host.t may fail in the presence of wildcard DNS records

Open eserte opened this issue 3 years ago • 0 comments

The test with invalid hostnames in t/10host.t fails on some of my smoker systems, probably due to presence of wildcard DNS records. Details about the problem may be found here: https://github.com/tokuhirom/Furl/issues/128

The problem can be reproduced on Linux systems by setting LOCALDOMAIN to a domain which has wildcard DNS records, e.g. bing.com:

$ LOCALDOMAIN=bing.com perl -Mblib t/10host.t      
...
#   Failed test 'realname set'
#   at t/10host.t line 40.
#          got: 'a-0001.a-msedge.net'
#     expected: 'Eevo5ang'

#   Failed test 'realname set'
#   at t/10host.t line 51.
#          got: 'a-0001.a-msedge.net'
#     expected: 'Eevo5ang'
... (more of these) ...
#   Failed test 'Eevo5ang realname: a-0001.a-msedge.net'
#   at t/10host.t line 738.
#          got: 'a-0001.a-msedge.net'
#     expected: 'Eevo5ang'
# Looks like you failed 24 tests of 1049.
t/10host.t ............... 
Dubious, test returned 24 (wstat 6144, 0x1800)
Failed 24/1049 subtests 

A possible fix is to add a trailing dot to all invalid hostnames to treat it as a "final" hostname. See the attached patch (sorry for not fixing the alignment after patching to keep the diff small): App-ClusterSSH-trailing-dot.patch.txt

eserte avatar Oct 09 '22 09:10 eserte