Lucas Nussbaum <[email protected]> writes: > That's strange.
> What the script sees is: > # ./runtests -o server/shell-misc-t > 1..15 > ok 1 - no REMCTL_USER > ok 2 - no SSH_CONNECTION > ok 3 - value for REMUSER > ok 4 - value for REMOTE_USER > ok 5 - value for REMOTE_ADDR > ok 6 - value for REMOTE_EXPIRES > ok 7 - return status for REMOTE_HOST > # env REMOTE_HOST: ip-172-31-8-210.eu-central-1.compute.internal > not ok 8 - value for REMOTE_HOST > ok 9 - file descriptors closed properly on server > However: > # cat /etc/hosts > 127.0.0.1 ip-172-31-8-210.eu-central-1.compute.internal localhost > And: > # host 127.0.0.1 > 1.0.0.127.in-addr.arpa domain name pointer localhost. host will always query DNS. To simulate the results of getaddrinfo, you have to use getent hosts 127.0.0.1. Thanks, that explains it! The local hostname is listed before localhost in /etc/hosts, so it's going to return that. That means my fix to check against the value of `hostname` will fix the test. -- Russ Allbery ([email protected]) <http://www.eyrie.org/~eagle/>

