From 644f9aa92e688a0a34d7625371bd7e5e5952c0f2 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 27 Feb 2016 22:18:22 -0800 Subject: [PATCH] test: apply Linux workaround to Linux only Do not try Ubuntu/SUSE/Debian-specific hostnames for IPv6 localhost unless we are on Linux. Fixes: https://github.com/nodejs/node/issues/4546 --- test/common.js | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/test/common.js b/test/common.js index cc54c65c7b2892..28e7972e223602 100644 --- a/test/common.js +++ b/test/common.js @@ -80,18 +80,21 @@ var opensslCli = null; var inFreeBSDJail = null; var localhostIPv4 = null; -exports.localIPv6Hosts = [ - // Debian/Ubuntu - 'ip6-localhost', - 'ip6-loopback', - - // SUSE - 'ipv6-localhost', - 'ipv6-loopback', - - // Typically universal - 'localhost', -]; +exports.localIPv6Hosts = ['localhost']; +if (process.platform === 'linux') { + exports.localIPv6Hosts = [ + // Debian/Ubuntu + 'ip6-localhost', + 'ip6-loopback', + + // SUSE + 'ipv6-localhost', + 'ipv6-loopback', + + // Typically universal + 'localhost', + ]; +} Object.defineProperty(exports, 'inFreeBSDJail', { get: function() {