Bug 911249 - Make sure harness does not block if killing a process hangs. r=ted
authorMihnea Dobrescu-Balaur <mihneadb@gmail.com>
Tue, 03 Sep 2013 13:56:08 -0700
changeset 145473 cb07c1c976f0ce7c624e72dda9dc8eecd6d82b84
parent 145472 ecd7cbc7c1790fdc8e74d7db98c27c7f53549803
child 145474 1f401bf37ef400bcd98fefa243a5fc726dcfab8e
push id33289
push userryanvm@gmail.com
push dateWed, 04 Sep 2013 17:07:57 +0000
treeherdermozilla-inbound@cb07c1c976f0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs911249
milestone26.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 911249 - Make sure harness does not block if killing a process hangs. r=ted
testing/xpcshell/runxpcshelltests.py
--- a/testing/xpcshell/runxpcshelltests.py
+++ b/testing/xpcshell/runxpcshelltests.py
@@ -1326,20 +1326,21 @@ class XPCShellTests(object):
             self.event.wait(1)
             self.event.clear()
 
             # find what tests are done (might be more than 1)
             done_tests = set()
             for test in running_tests:
                 if test.done:
                     done_tests.add(test)
-                    test.join()
+                    test.join(1) # join with timeout so we don't hang on blocked threads
                     # if the test had trouble, we will try running it again
                     # at the end of the run
-                    if test.retry:
+                    if test.retry or test.is_alive():
+                        # if the join call timed out, test.is_alive => True
                         self.try_again_list.append(test.test_object)
                         continue
                     # did the test encounter any exception?
                     if test.exception:
                         exceptions.append(test.exception)
                         tracebacks.append(test.traceback)
                         # we won't add any more tests, will just wait for
                         # the currently running ones to finish