[Webkit-unassigned] [Bug 17678] run-webkit-tests should have a watchdog timer (and timeout long tests)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Mar 5 11:35:27 PST 2008


http://bugs.webkit.org/show_bug.cgi?id=17678


slewis at apple.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |slewis at apple.com




------- Comment #1 from slewis at apple.com  2008-03-05 11:35 PDT -------
Something similar to the following could work

     my $actual = "";
-    while (<IN>) {
-        last if /#EOF/;
-        $actual .= $_;
+    eval {
+        local $SIG{ALRM} = sub { die "test timed out" }
+        alarm 60; # die if test takes more than a minute
+        eval { 
+            while (<IN>) {
+                last if /#EOF/;
+                $actual .= $_;
+            }
+        }
+        alarm 0; # cancel alarm
+    } 
+    alarm 0; # avoid race condition
+    my $alarm_error = $@;
+    die $alarm_error if $alarm_error && $alarm_error !~ /test timed out/; #
reraise other errors
+    if ($alarm_error) {
+        printFailureMessageForTest($test, "Test timed out!");
+        killDumpTool();
+        next;
     }


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list