Uh oh!
There was an error while loading. Please reload this page.
test: Avoid usage of mixed IPV6 addresses - #7702
Conversation
gibfahn
commented
Jul 13, 2016
@gireeshpunathil Do you want to make a similar change to gc/test-net-timeout.js to fix #7291? It seems to be the same problem, so I guess it would make sense to do it in the same PR. |
gireeshpunathil
commented
Jul 13, 2016
@gibfahn - sure, will check. |
@gireeshpunathil I've checked @quaidn 's suggested fix at #7291 (comment) and it seems to work. diff --git a/test/gc/test-net-timeout.js b/test/gc/test-net-timeout.js
index ff1d565..0e68f78 100644
--- a/test/gc/test-net-timeout.js+++ b/test/gc/test-net-timeout.js@@ -36,7 +36,11 @@ function getall() {
return;
(function() {
- var req = net.connect(server.address().port, server.address().address);+ if (server.address().family === 'IPv4') {+ var req = net.connect(server.address().port, '127.0.0.1');+ } else {+ var req = net.connect(server.address().port, '::1');+ }
req.resume();
req.setTimeout(10, function() {
//console.log('timeout (expected)') |
gireeshpunathil
commented
Jul 13, 2016
The problem is with the lack of cohesion between what is documented in the server.listen documentation and what is requested by the client in the proposed fix. For example, the API spec says 'If the hostname is omitted, the server will accept connections on any IPv6 address (::) when IPv6 is available'. When connecting to a server socket thus created, it becomes problematic if we use '::1' which is basically the loopback address, not 'any address'. While everything works in Linux magically, I see an issue in Mac. For better traceability, I suggest we separate this (AIX) from #7291 (windows). I can work with you on that further. |
gibfahn
commented
Jul 13, 2016
@gireeshpunathil Okay, if they're different fixes I agree it makes sense to do different PRs. |
gireeshpunathil
commented
Jul 14, 2016
mhdawson
commented
Jul 14, 2016
|
Trott
commented
Jul 15, 2016
Oh, wait never mind my previous comment. That sets an array, not a single address value. This change LGTM. |
Trott
commented
Jul 15, 2016
/cc @bnoordhuis |
bnoordhuis
commented
Jul 16, 2016
s/Avoid/avoid/ in the commit status line, otherwise LGTM. |
cjihrig
commented
Jul 16, 2016
The test case fails in AIX due to the mixed-use of unspecified
and loopback addresses. This is not a problem in most platforms
but fails in AIX. (In Windows too, but does not manifest as the
test is omitted in Windows for a different reason).
There exists no documented evidence which supports the mixed use
of unspecified and loopback addresses.
While AIX strictly follows the IPV6 specification with respect to
unspecified address ('::') and loopback address ('::1'), the test
case latches on to the behavior exhibited by other platforms,
and hence it fails in AIX.
The proposed fix is to make it work in all platforms including
AIX by using the loopback address for the client to connect,
as that is the address at which the server listens.gireeshpunathil
commented
Jul 18, 2016
Made the changes to commit message (s/Avoid/avoid/) as advised by @bnoordhuis |
mhdawson
commented
Jul 18, 2016
CI looks good landing |
mhdawson
commented
Jul 18, 2016
landed as 17883df |
The test case fails in AIX due to the mixed-use of unspecified
and loopback addresses. This is not a problem in most platforms
but fails in AIX. (In Windows too, but does not manifest as the
test is omitted in Windows for a different reason).
There exists no documented evidence which supports the mixed use
of unspecified and loopback addresses.
While AIX strictly follows the IPV6 specification with respect to
unspecified address ('::') and loopback address ('::1'), the test
case latches on to the behavior exhibited by other platforms,
and hence it fails in AIX.
The proposed fix is to make it work in all platforms including
AIX by using the loopback address for the client to connect,
as that is the address at which the server listens.
Fixes: #7563
PR-URL: #7702
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>The test case fails in AIX due to the mixed-use of unspecified
and loopback addresses. This is not a problem in most platforms
but fails in AIX. (In Windows too, but does not manifest as the
test is omitted in Windows for a different reason).
There exists no documented evidence which supports the mixed use
of unspecified and loopback addresses.
While AIX strictly follows the IPV6 specification with respect to
unspecified address ('::') and loopback address ('::1'), the test
case latches on to the behavior exhibited by other platforms,
and hence it fails in AIX.
The proposed fix is to make it work in all platforms including
AIX by using the loopback address for the client to connect,
as that is the address at which the server listens.
Fixes: #7563
PR-URL: #7702
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>The test case fails in AIX due to the mixed-use of unspecified
and loopback addresses. This is not a problem in most platforms
but fails in AIX. (In Windows too, but does not manifest as the
test is omitted in Windows for a different reason).
There exists no documented evidence which supports the mixed use
of unspecified and loopback addresses.
While AIX strictly follows the IPV6 specification with respect to
unspecified address ('::') and loopback address ('::1'), the test
case latches on to the behavior exhibited by other platforms,
and hence it fails in AIX.
The proposed fix is to make it work in all platforms including
AIX by using the loopback address for the client to connect,
as that is the address at which the server listens.
Fixes: #7563
PR-URL: #7702
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>The test case fails in AIX due to the mixed-use of unspecified
and loopback addresses. This is not a problem in most platforms
but fails in AIX. (In Windows too, but does not manifest as the
test is omitted in Windows for a different reason).
There exists no documented evidence which supports the mixed use
of unspecified and loopback addresses.
While AIX strictly follows the IPV6 specification with respect to
unspecified address ('::') and loopback address ('::1'), the test
case latches on to the behavior exhibited by other platforms,
and hence it fails in AIX.
The proposed fix is to make it work in all platforms including
AIX by using the loopback address for the client to connect,
as that is the address at which the server listens.
Fixes: #7563
PR-URL: #7702
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>The test case fails in AIX due to the mixed-use of unspecified
and loopback addresses. This is not a problem in most platforms
but fails in AIX. (In Windows too, but does not manifest as the
test is omitted in Windows for a different reason).
There exists no documented evidence which supports the mixed use
of unspecified and loopback addresses.
While AIX strictly follows the IPV6 specification with respect to
unspecified address ('::') and loopback address ('::1'), the test
case latches on to the behavior exhibited by other platforms,
and hence it fails in AIX.
The proposed fix is to make it work in all platforms including
AIX by using the loopback address for the client to connect,
as that is the address at which the server listens.
Fixes: #7563
PR-URL: #7702
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>The test case fails in AIX due to the mixed-use of unspecified
and loopback addresses. This is not a problem in most platforms
but fails in AIX. (In Windows too, but does not manifest as the
test is omitted in Windows for a different reason).
There exists no documented evidence which supports the mixed use
of unspecified and loopback addresses.
While AIX strictly follows the IPV6 specification with respect to
unspecified address ('::') and loopback address ('::1'), the test
case latches on to the behavior exhibited by other platforms,
and hence it fails in AIX.
The proposed fix is to make it work in all platforms including
AIX by using the loopback address for the client to connect,
as that is the address at which the server listens.
Fixes: #7563
PR-URL: #7702
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Checklist
make -j4 test(UNIX), orvcbuild test nosign(Windows) passesAffected core subsystem(s)
test, cluster
Description of change
Please see #7563 for full details.
The test case test/parallel/test-cluster-disconnect-handles.js
fails in AIX due to the mixed-use of unspecified
and loopback addresses. This is not a problem in most platforms
but fails in AIX. (In Windows too, but does not manifest as the
test is omitted in Windows for a different reason).
There exists no documented evidence which supports the mixed use
of unspecified and loopback addresses.
While AIX strictly follows the IPV6 specification with respect to
unspecified address ('::') and loopback address ('::1'), the test
case latches on to the behavior exhibited by other platforms,
and hence it fails in AIX.
The proposed fix is to make it work in all platforms including
AIX by using the loopback address for the client to connect,
as that is the address at which the server listens.