[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198
mjs at apple.com
mjs at apple.com
Sun Feb 20 22:53:20 UTC 2011
The following commit has been merged in the webkit-1.3 branch:
commit 526ec0da5d75d4631ec8fe10bf337f6e2e0919d4
Author: mjs at apple.com <mjs at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Jan 13 00:22:53 2011 +0000
2011-01-12 Maciej Stachowiak <mjs at apple.com>
Reviewed by Sam Weinig.
Detect, identify and recover from WebProcess crashes in run-webkit-tests
https://bugs.webkit.org/show_bug.cgi?id=52330
* Scripts/old-run-webkit-tests: Detect when the regression test tool reports
a web process crash.
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::initialize): Set up a processDidCrash
callback.
(WTR::TestController::processDidCrash): Report that the Web process
crashed.
* WebKitTestRunner/TestController.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75655 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Tools/ChangeLog b/Tools/ChangeLog
index 34a317f..8d02d44 100644
--- a/Tools/ChangeLog
+++ b/Tools/ChangeLog
@@ -1,3 +1,19 @@
+2011-01-12 Maciej Stachowiak <mjs at apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Detect, identify and recover from WebProcess crashes in run-webkit-tests
+ https://bugs.webkit.org/show_bug.cgi?id=52330
+
+ * Scripts/old-run-webkit-tests: Detect when the regression test tool reports
+ a web process crash.
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::initialize): Set up a processDidCrash
+ callback.
+ (WTR::TestController::processDidCrash): Report that the Web process
+ crashed.
+ * WebKitTestRunner/TestController.h:
+
2011-01-12 David Levin <levin at chromium.org>
Reviewed by Shinichiro Hamaji.
diff --git a/Tools/Scripts/old-run-webkit-tests b/Tools/Scripts/old-run-webkit-tests
index 7fbb5da..a8882ad 100755
--- a/Tools/Scripts/old-run-webkit-tests
+++ b/Tools/Scripts/old-run-webkit-tests
@@ -113,7 +113,7 @@ sub splitpath($);
sub stopRunningTestsEarlyIfNeeded();
sub stripExtension($);
sub stripMetrics($$);
-sub testCrashedOrTimedOut($$$$$);
+sub testCrashedOrTimedOut($$$$$$);
sub toCygwinPath($);
sub toURL($);
sub toWindowsPath($);
@@ -806,8 +806,9 @@ for my $test (@tests) {
unless ($readResults->{status} eq "success") {
my $crashed = $readResults->{status} eq "crashed";
- testCrashedOrTimedOut($test, $base, $crashed, $actual, $error);
- countFinishedTest($test, $base, $crashed ? "crash" : "timedout", 0);
+ my $webProcessCrashed = $readResults->{status} eq "webProcessCrashed";
+ testCrashedOrTimedOut($test, $base, $crashed, $webProcessCrashed, $actual, $error);
+ countFinishedTest($test, $base, $webProcessCrashed ? "webProcessCrash" : $crashed ? "crash" : "timedout", 0);
last if stopRunningTestsEarlyIfNeeded();
next;
}
@@ -916,7 +917,7 @@ for my $test (@tests) {
if (dumpToolDidCrash()) {
$result = "crash";
- testCrashedOrTimedOut($test, $base, 1, $actual, $error);
+ testCrashedOrTimedOut($test, $base, 1, 0, $actual, $error);
} elsif (!defined $expected) {
if ($verbose) {
print "new " . ($resetResults ? "result" : "test");
@@ -1139,6 +1140,7 @@ if ($ignoreMetrics) {
print HTML htmlForResultsSection(@{$tests{mismatch}}, "Tests where results did not match expected results", \&linksForMismatchTest);
print HTML htmlForResultsSection(@{$tests{timedout}}, "Tests that timed out", \&linksForErrorTest);
print HTML htmlForResultsSection(@{$tests{crash}}, "Tests that caused the DumpRenderTree tool to crash", \&linksForErrorTest);
+print HTML htmlForResultsSection(@{$tests{webProcessCrash}}, "Tests that caused the Web process to crash", \&linksForErrorTest);
print HTML htmlForResultsSection(@{$tests{error}}, "Tests that had stderr output", \&linksForErrorTest);
print HTML htmlForResultsSection(@{$tests{new}}, "Tests that had no expected results (probably new)", \&linksForNewTest);
@@ -1702,13 +1704,13 @@ sub countFinishedTest($$$$)
push @{$tests{$result}}, $test;
}
-sub testCrashedOrTimedOut($$$$$)
+sub testCrashedOrTimedOut($$$$$$)
{
- my ($test, $base, $didCrash, $actual, $error) = @_;
+ my ($test, $base, $didCrash, $webProcessCrashed, $actual, $error) = @_;
- printFailureMessageForTest($test, $didCrash ? "crashed" : "timed out");
+ printFailureMessageForTest($test, $webProcessCrashed ? "Web process crashed" : $didCrash ? "crashed" : "timed out");
- sampleDumpTool() unless $didCrash;
+ sampleDumpTool() unless $didCrash || $webProcessCrashed;
my $dir = dirname(File::Spec->catdir($testResultsDirectory, $base));
mkpath $dir;
@@ -2157,6 +2159,10 @@ sub readFromDumpToolWithTimer(**)
}
}
if (defined($lineError)) {
+ if ($lineError =~ /#CRASHED - WebProcess/) {
+ $status = "webProcessCrashed";
+ last;
+ }
if ($lineError =~ /#CRASHED/) {
$status = "crashed";
last;
@@ -2394,10 +2400,11 @@ sub printResults
new => "were new",
timedout => "timed out",
crash => "crashed",
+ webProcessCrash => "Web process crashed",
error => "had stderr output"
);
- for my $type ("match", "mismatch", "new", "timedout", "crash", "error") {
+ for my $type ("match", "mismatch", "new", "timedout", "crash", "webProcessCrash", "error") {
my $typeCount = $counts{$type};
next unless $typeCount;
my $typeText = $text{$type};
diff --git a/Tools/WebKitTestRunner/TestController.cpp b/Tools/WebKitTestRunner/TestController.cpp
index 764bd50..58fdfb6 100644
--- a/Tools/WebKitTestRunner/TestController.cpp
+++ b/Tools/WebKitTestRunner/TestController.cpp
@@ -272,7 +272,7 @@ void TestController::initialize(int argc, const char* argv[])
0, // didFinishProgress
0, // didBecomeUnresponsive
0, // didBecomeResponsive
- 0, // processDidExit
+ processDidCrash, // processDidCrash
0 // didChangeBackForwardList
};
WKPageSetPageLoaderClient(m_mainWebView->page(), &pageLoaderClient);
@@ -395,6 +395,11 @@ void TestController::didFinishLoadForFrame(WKPageRef page, WKFrameRef frame, WKT
static_cast<TestController*>(const_cast<void*>(clientInfo))->didFinishLoadForFrame(page, frame);
}
+void TestController::processDidCrash(WKPageRef page, const void* clientInfo)
+{
+ static_cast<TestController*>(const_cast<void*>(clientInfo))->processDidCrash(page);
+}
+
void TestController::didFinishLoadForFrame(WKPageRef page, WKFrameRef frame)
{
if (m_state != Resetting)
@@ -411,4 +416,10 @@ void TestController::didFinishLoadForFrame(WKPageRef page, WKFrameRef frame)
shared().notifyDone();
}
+void TestController::processDidCrash(WKPageRef page)
+{
+ fputs("#CRASHED - WebProcess\n", stderr);
+ fflush(stderr);
+}
+
} // namespace WTR
diff --git a/Tools/WebKitTestRunner/TestController.h b/Tools/WebKitTestRunner/TestController.h
index ef41314..fc8bd30 100644
--- a/Tools/WebKitTestRunner/TestController.h
+++ b/Tools/WebKitTestRunner/TestController.h
@@ -82,6 +82,9 @@ private:
static void didFinishLoadForFrame(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void*);
void didFinishLoadForFrame(WKPageRef page, WKFrameRef frame);
+ static void processDidCrash(WKPageRef, const void* clientInfo);
+ void processDidCrash(WKPageRef);
+
OwnPtr<TestInvocation> m_currentInvocation;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list