duncs / clusterssh

Cluster SSH - Cluster Admin Via SSH
https://github.com/duncs/clusterssh/wiki
897 stars 79 forks source link

Tests failing in t/10host.t #23

Closed mperry2 closed 8 years ago

mperry2 commented 9 years ago

Tests failing in t/10host.t when building App-ClusterSSH-4.03_06. I've replaced my own domain name with "example.com" in the output below.

$ ./Build test
Generating: ccon
Generating: crsh
Generating: cssh
Generating: ctel
t/00-load.t ....... ok   
t/01l10n.t ........ ok   
t/02base.t ........ ok     
t/05getopts.t ..... ok     
t/10host.t ........ 1/? 
#   Failed test 'realname set'
#   at t/10host.t line 28.
#          got: 'hostname.example.com'
#     expected: 'hostname'

#   Failed test 'realname set'
#   at t/10host.t line 97.
#          got: 'hostname.example.com'
#     expected: 'hostname'

#   Failed test 'realname set'
#   at t/10host.t line 121.
#          got: 'hostname.example.com'
#     expected: 'hostname'

#   Failed test 'realname set'
#   at t/10host.t line 147.
#          got: 'hostname.example.com'
#     expected: 'hostname'

#   Failed test 'realname set'
#   at t/10host.t line 165.
#          got: 'hostname.example.com'
#     expected: 'hostname'

#   Failed test 'user@hostname realname: hostname'
#   at t/10host.t line 725.
#          got: 'hostname.example.com'
#     expected: 'hostname'

#   Failed test 'user@hostname:3232=1x1+1+1 realname: hostname'
#   at t/10host.t line 725.
#          got: 'hostname.example.com'
#     expected: 'hostname'

#   Failed test 'hostname:2323 realname: hostname'
#   at t/10host.t line 725.
#          got: 'hostname.example.com'
#     expected: 'hostname'

#   Failed test 'hostname realname: hostname'
#   at t/10host.t line 725.
#          got: 'hostname.example.com'
#     expected: 'hostname'

#   Failed test 'hostname:3232=1x1+1+1 realname: hostname'
#   at t/10host.t line 725.
#          got: 'hostname.example.com'
#     expected: 'hostname'

#   Failed test 'user@hostname:2323 realname: hostname'
#   at t/10host.t line 725.
#          got: 'hostname.example.com'
#     expected: 'hostname'
t/10host.t ........ 703/? # Looks like you failed 11 tests of 960.
t/10host.t ........ Dubious, test returned 11 (wstat 2816, 0xb00)
Failed 11/960 subtests 
t/15config.t ...... ok     
t/20helper.t ...... ok    
t/30cluster.t ..... ok    
t/80clusterssh.t .. ok   
t/boilerplate.t ... ok   
t/changes.t ....... ok   
t/manifest.t ...... ok   
t/perltidy.t ...... ok     
t/pod-coverage.t .. ok   
t/pod.t ........... ok     

Test Summary Report
-------------------
t/05getopts.t   (Wstat: 0 Tests: 171 Failed: 0)
  TODO passed:   160-163, 168-171
t/10host.t      (Wstat: 2816 Tests: 960 Failed: 11)
  Failed tests:  8, 54, 67, 80, 88, 243, 310, 427, 479, 689
                702
  Non-zero exit status: 11
Files=15, Tests=1604, 10 wallclock secs ( 0.16 usr  0.16 sys +  8.11 cusr  0.84 csys =  9.27 CPU)
Result: FAIL
Failed 1/15 test programs. 11/1604 subtests failed.
duncs commented 8 years ago

Can you provide more information about this please - the modules at this point are trying to look up 'hostname' which is normally returned as-is when it cannot be resolved by name lookup, but your system appears to be returning the name fully qualified as though it can be looked up.

Can you provide the output from

$ getent hosts hostname

On my system I get nothing returned. If you do get output from this, is it a valid host name on your network? If so I'll amend the test to use

$ getent hosts some_fake_hostname

or similar.

Duncs

mperry2 commented 8 years ago

Here's the output.

$ getent hosts hostname
10.18.1.42   hostname.example.com

It's a valid host. Apparently someone has registered a computer named "hostname" on my company's network.

duncs commented 8 years ago

The test has been fixed and pushed to the code repository.

Thanks for the report.

Duncs