From 9d2c240868123ff4fba68c319c0f9bd549591e0b Mon Sep 17 00:00:00 2001 From: David Keeler Date: Wed, 4 Mar 2015 13:41:11 -0800 Subject: [PATCH] bug 1129771 - disable IPv6 in PSM xpcshell TLS connection tests due to failures on OS X 10.10 r=cykesiopka a=ryanvm on a CLOSED TREE In the process of investigating the intermittent failures listed in bug 1129771, I discovered that the code would frequently get stuck connecting to [::1] (where no server was listening) and wouldn't fall back to trying 127.0.0.1 (where the test server was listening). This change prevents the code attempting to connect to [::1]. There probably is an underlying bug here, but it appears to be in OS X itself and I have neither the time nor expertise to investigate further. --- security/manager/ssl/tests/unit/head_psm.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/security/manager/ssl/tests/unit/head_psm.js b/security/manager/ssl/tests/unit/head_psm.js index 1fee155c527..ca8bbded1c5 100644 --- a/security/manager/ssl/tests/unit/head_psm.js +++ b/security/manager/ssl/tests/unit/head_psm.js @@ -256,6 +256,9 @@ function add_connection_test(aHost, aExpectedResult, let sts = Cc["@mozilla.org/network/socket-transport-service;1"] .getService(Ci.nsISocketTransportService); this.transport = sts.createTransport(["ssl"], 1, aHost, REMOTE_PORT, null); + // See bug 1129771 - attempting to connect to [::1] when the server is + // listening on 127.0.0.1 causes frequent failures on OS X 10.10. + this.transport.connectionFlags |= Ci.nsISocketTransport.DISABLE_IPV6; this.transport.setEventSink(this, this.thread); this.inputStream = null; this.outputStream = null;