Re: connections to external hosts during tests now cause crashes
On 2014-06-17 11:01 AM, Nathan Froyd wrote: [bcc dev-tree-management] In the continuing effort to make our testsuites more reliable, bug 995417 has landed on inbound. This bug enforces the long-standing policy of no external network connections in the testsuite with code: external network connections will now crash the browser if and when they occur during tests, rather than intermittently causing failures. \o/ - If you need a host that doesn't exist (e.g. testing XMLHttpRequest error behavior), you ought to be able to just make one up. Make it sufficiently whimsical. The TLD `.invalid` is reserved for this purpose in RFC 2606 https://tools.ietf.org/html/rfc2606. If we used that consistently, it would be easy to tell, when reading unfamiliar tests, that a host is not supposed to exist. zw ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Re: connections to external hosts during tests now cause crashes
On 6/17/2014 8:01 AM, Nathan Froyd wrote: - For xpcshell, you should set up mock servers via httpd.js (see numerous examples in existing xpcshell tests). I use xpcshell to drive tests for an extension that attaches to external servers. This is all done by me and not part of any official Mozilla test suite. Your quote above implies this is not possible any longer with the default test driver code. Is that true? Is there are preference that could be set to allow xpcshell tests to attach to external servers? :rkent ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Re: connections to external hosts during tests now cause crashes
On 6/17/14 7:58 PM, Kent James wrote: On 6/17/2014 8:01 AM, Nathan Froyd wrote: - For xpcshell, you should set up mock servers via httpd.js (see numerous examples in existing xpcshell tests). I use xpcshell to drive tests for an extension that attaches to external servers. This is all done by me and not part of any official Mozilla test suite. Your quote above implies this is not possible any longer with the default test driver code. Is that true? Is there are preference that could be set to allow xpcshell tests to attach to external servers? :rkent Hey Kent, reading bug 995417, the crash only happens if MOZ_DISABLE_NONLOCAL_CONNECTIONS is set, which is set only in the testing infrastructure. Philipp ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Re: connections to external hosts during tests now cause crashes
On 6/17/2014 2:22 PM, Philipp Kewisch wrote: Hey Kent, reading bug 995417, the crash only happens if MOZ_DISABLE_NONLOCAL_CONNECTIONS is set, which is set only in the testing infrastructure. Philipp Which is actually not ideal because it means we can end up with failures on TBPL that aren't hit during the course of normal local testing. ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Re: connections to external hosts during tests now cause crashes
- Original Message - On 6/17/2014 2:22 PM, Philipp Kewisch wrote: Hey Kent, reading bug 995417, the crash only happens if MOZ_DISABLE_NONLOCAL_CONNECTIONS is set, which is set only in the testing infrastructure. Which is actually not ideal because it means we can end up with failures on TBPL that aren't hit during the course of normal local testing. If we do, that is a bug; MOZ_DISABLE_NONLOCAL_CONNECTIONS is setup in the Python modules that both TBPL and local testing use. So there shouldn't be any problems with locally-unreproducible failures. A related problem is that MOZ_DISABLE_NONLOCAL_CONNECTIONS may or may not be set for all the testsuites we run. It's not set for Talos, for instance, and perhaps the C++ unittests and a few others. And there's no guarantee that a new testsuite will have MOZ_DISABLE_NONLOCAL_CONNECTIONS set, which is an unfortunate loophole (though if they use common infrastructure, the chances go up signficantly). It's a reasonable fix given the constraints, but it's not a perfect one. -Nathan ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Re: connections to external hosts during tests now cause crashes
On Tue, Jun 17, 2014 at 8:01 AM, Nathan Froyd froy...@mozilla.com wrote: In the continuing effort to make our testsuites more reliable, bug 995417 has landed on inbound. This bug enforces the long-standing policy of no external network connections in the testsuite with code: external network connections will now crash the browser if and when they occur during tests, rather than intermittently causing failures. This is an excellent thing, and it was a sizable amount of not-particularly-fun work. Thanks, Nathan! Nick ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform