Bug 1452913 - Prevent hang of reftests when reading test objects list fails. r=gbrown
authorHenrik Skupin <mail@hskupin.info>
Tue, 10 Apr 2018 14:20:02 +0200
changeset 412667 f079b11f50b7563a87d35931fa45bcbeecb02484
parent 412666 d186bcce12353c5e51ec1857d24fac367003564c
child 412668 5b9d9f133beeb3b2da655a5420f3087e2707d7bd
push id101981
push useraiakab@mozilla.com
push dateTue, 10 Apr 2018 22:18:59 +0000
treeherdermozilla-inbound@9ad2b8aabfae [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgbrown
bugs1452913
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1452913 - Prevent hang of reftests when reading test objects list fails. r=gbrown For the promise as returned by "OS.File.read()" the catch handler is missing, and as such the tests will never be started when the call to "read()" triggers an exception. It also results in a hang of the reftest harness. To prevent this, the failure has to be handled and appropriately reported. MozReview-Commit-ID: IX9thgjjahS
layout/tools/reftest/reftest.jsm
--- a/layout/tools/reftest/reftest.jsm
+++ b/layout/tools/reftest/reftest.jsm
@@ -363,16 +363,19 @@ function ReadTests() {
         }
 
         if (testList) {
             logger.debug("Reading test objects from: " + testList);
             let promise = OS.File.read(testList).then(function onSuccess(array) {
                 let decoder = new TextDecoder();
                 g.urls = JSON.parse(decoder.decode(array)).map(CreateUrls);
                 StartTests();
+            }).catch(function onFailure(e) {
+                logger.error("Failed to load test objects: " + e);
+                DoneTests();
             });
         } else if (manifests) {
             // Parse reftest manifests
             // XXX There is a race condition in the manifest parsing code which
             // sometimes shows up on Android jsreftests (bug 1416125). It seems
             // adding/removing log statements can change its frequency.
             logger.debug("Reading " + manifests.length + " manifests");
             manifests = JSON.parse(manifests);