diff --git a/tools/wptrunner/wptrunner/executors/base.py b/tools/wptrunner/wptrunner/executors/base.py index 763b6fcb19fb32..92a782e835c11b 100644 --- a/tools/wptrunner/wptrunner/executors/base.py +++ b/tools/wptrunner/wptrunner/executors/base.py @@ -313,7 +313,7 @@ def run_test(self, test): result = self.do_test(test) except Exception as e: exception_string = traceback.format_exc() - message = f"Exception in TextExecutor.run:\n{exception_string}" + message = f"Exception in TestExecutor.run:\n{exception_string}" self.logger.warning(message) result = self.result_from_exception(test, e, exception_string) diff --git a/tools/wptrunner/wptrunner/executors/executorwebdriver.py b/tools/wptrunner/wptrunner/executors/executorwebdriver.py index 3a2f29bdc9df20..69013e5e796979 100644 --- a/tools/wptrunner/wptrunner/executors/executorwebdriver.py +++ b/tools/wptrunner/wptrunner/executors/executorwebdriver.py @@ -539,7 +539,9 @@ def run_func(self): self.result = True, self.func(self.protocol, self.url, self.timeout) except (error.TimeoutException, error.ScriptTimeoutException): self.result = False, ("EXTERNAL-TIMEOUT", None) - except (socket.timeout, error.UnknownErrorException): + except socket.timeout: + # Checking if the browser is alive below is likely to hang, so mark + # this case as a CRASH unconditionally. self.result = False, ("CRASH", None) except Exception as e: if (isinstance(e, error.WebDriverException) and @@ -548,11 +550,12 @@ def run_func(self): # workaround for https://bugs.chromium.org/p/chromedriver/issues/detail?id=2001 self.result = False, ("EXTERNAL-TIMEOUT", None) else: + status = "INTERNAL-ERROR" if self.protocol.is_alive() else "CRASH" message = str(getattr(e, "message", "")) if message: message += "\n" message += traceback.format_exc() - self.result = False, ("INTERNAL-ERROR", message) + self.result = False, (status, message) finally: self.result_flag.set()