Fix a few issues in test/internet/test-dns.js:
- 'hint' should be 'hints'
- reverse name lookup is not guaranteed to return 'localhost'
- V4MAPPED hint requires IPV6 address family
Signed-off-by: Timothy J Fontaine <tjfontaine@gmail.com>
Instead of hard-coding http service name in test-dns, retrieve it from
/etc/services. This is not ideal, but it's still better than hard-coding
it.
Fixes#8047.
Signed-off-by: Timothy J Fontaine <tjfontaine@gmail.com>
Currently the address resolution family defaults to IPv4. Instead remove
the preference and instead resolve to a family suitable for the host.
Expose the getaddrinfo flags and allow them to be passed.
Add documentation about new flags.
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
internet/test-dns.js assumes that ::1 always resolves to "localhost" on
all platforms. This is not what happens in reality. Some platforms
resolve it to "ip6-localhost" too. There doesn't seem to be any consensus
on what's the right thing to do. However, most sane platforms will use
either one of these two values.
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
When `tls.connect()` is called with `socket` option, it should try to
reuse hostname previously passed to `net.connect()` and only after that
fall back to `'localhost'`.
fix#6409
* The test calls an internal API that changed in commit ca9eb71.
* Trying to reverse-lookup a bogus hostname now returns EINVAL rather
than the (bogus!) status code ENOTIMP.
It is not a valid test unless you're connected to the internet, and causes
a lot of spurious failures on Linux anyway, as it's highly dependent on
timing of things that we don't have any control over.
Mostly just upgraded tools/test.py to the latest one that's in V8. But also
fixing the before and after hooks to preserve the test/tmp directory so that
running tests manually usually works.