Skip to content
Permalink
Browse files
Sample Process on notifyDone timed out
https://bugs.webkit.org/show_bug.cgi?id=161063

Patch by Jonathan Bedard <jbedard@apple.com> on 2016-08-29
Reviewed by Darin Adler.

* Scripts/webkitpy/port/driver.py:
(Driver._check_for_driver_timeout):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp: Call sample_process during notifyDone timeouts.
(WTR::TestRunner::waitToDumpWatchdogTimerFired):
* WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm: Log pid and name for testing harness.

Canonical link: https://commits.webkit.org/179497@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@205123 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
JonWBedard authored and webkit-commit-queue committed Aug 29, 2016
1 parent b437952 commit 4abf57679b2f18581e7f1f69e2a4b2011afe055e
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
@@ -1,3 +1,16 @@
2016-08-29 Jonathan Bedard <jbedard@apple.com>

Sample Process on notifyDone timed out
https://bugs.webkit.org/show_bug.cgi?id=161063

Reviewed by Darin Adler.

* Scripts/webkitpy/port/driver.py:
(Driver._check_for_driver_timeout):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp: Call sample_process during notifyDone timeouts.
(WTR::TestRunner::waitToDumpWatchdogTimerFired):
* WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm: Log pid and name for testing harness.

2016-08-29 Jonathan Bedard <jbedard@apple.com>

Check-webkit-style does not work with Objective-C blocks
@@ -422,6 +422,15 @@ def cmd_line(self, pixel_tests, per_test_args):
return cmd

def _check_for_driver_timeout(self, out_line):
if out_line.startswith("#PID UNRESPONSIVE - "):
match = re.match('#PID UNRESPONSIVE - (\S+)', out_line)
child_process_name = match.group(1) if match else 'WebProcess'
match = re.search('pid (\d+)', out_line)
child_process_pid = int(match.group(1)) if match else None
err_line = 'Wait on notifyDone timed out, process ' + child_process_name + ' pid = ' + str(child_process_pid)
self.error_from_test += err_line
_log.debug(err_line)
self._port.sample_process(child_process_name, child_process_pid)
if out_line == "FAIL: Timed out waiting for notifyDone to be called\n":
self._driver_timed_out = True

@@ -44,6 +44,7 @@
#include <WebKit/WKBundlePrivate.h>
#include <WebKit/WKBundleScriptWorld.h>
#include <WebKit/WKData.h>
#include <WebKit/WKPagePrivate.h>
#include <WebKit/WKRetainPtr.h>
#include <WebKit/WKSerializedScriptValue.h>
#include <WebKit/WebKit2_C.h>
@@ -158,6 +159,11 @@ void TestRunner::waitToDumpWatchdogTimerFired()
{
invalidateWaitToDumpWatchdogTimer();
auto& injectedBundle = InjectedBundle::singleton();
#if PLATFORM(COCOA)
char buffer[1024];
snprintf(buffer, sizeof(buffer), "#PID UNRESPONSIVE - %s (pid %d)\n", getprogname(), getpid());
injectedBundle.outputText(buffer);
#endif
injectedBundle.outputText("FAIL: Timed out waiting for notifyDone to be called\n\n");
injectedBundle.done();
}

0 comments on commit 4abf576

Please sign in to comment.