RESOLVED FIXED 17678
run-webkit-tests should have a watchdog timer (and timeout long tests)
https://bugs.webkit.org/show_bug.cgi?id=17678
Summary run-webkit-tests should have a watchdog timer (and timeout long tests)
Eric Seidel (no email)
Reported 2008-03-05 01:22:59 PST
run-webkit-tests should have a watchdog timer (and timeout long tests) I've occasionally hit problems where I've made tests time-out. It seems run-webkit-tests should just have a watchdog and automagically timeout tests which take to long. Similar to the existing "wait until done" watchdog. We could start with a very high value and lower it over time.
Attachments
Cleanup 1 (2.85 KB, patch)
2008-04-17 16:22 PDT, Adam Roben (:aroben)
eric: review+
Cleanup 2 (3.69 KB, patch)
2008-04-17 16:23 PDT, Adam Roben (:aroben)
eric: review+
Cleanup 3 (2.85 KB, patch)
2008-04-17 16:23 PDT, Adam Roben (:aroben)
eric: review+
Cleanup 4 (8.63 KB, patch)
2008-04-17 16:23 PDT, Adam Roben (:aroben)
eric: review+
Cleanup 5 (1.55 KB, patch)
2008-04-17 16:23 PDT, Adam Roben (:aroben)
eric: review+
Fix v1 (9.32 KB, patch)
2008-04-17 16:24 PDT, Adam Roben (:aroben)
eric: review+
Stephanie Lewis
Comment 1 2008-03-05 11:35:26 PST
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; }
mitz
Comment 2 2008-03-06 11:42:00 PST
DumpRenderTree support added by Brady in <http://trac.webkit.org/projects/webkit/changeset/30849>.
Brady Eidson
Comment 3 2008-03-06 11:45:52 PST
Indeed - DRT now has a Watchdog *thread* which is immune to deadlocks or "the timer thread going out to lunch" It's turned on for DRTMac right now, and should be easy to turn on for other platforms DRT's as well.
Adam Roben (:aroben)
Comment 4 2008-04-17 15:10:58 PDT
I'm working on a fix for this.
Adam Roben (:aroben)
Comment 5 2008-04-17 16:22:54 PDT
Created attachment 20647 [details] Cleanup 1
Adam Roben (:aroben)
Comment 6 2008-04-17 16:23:05 PDT
Created attachment 20648 [details] Cleanup 2
Adam Roben (:aroben)
Comment 7 2008-04-17 16:23:15 PDT
Created attachment 20649 [details] Cleanup 3
Adam Roben (:aroben)
Comment 8 2008-04-17 16:23:35 PDT
Created attachment 20651 [details] Cleanup 4
Adam Roben (:aroben)
Comment 9 2008-04-17 16:23:47 PDT
Created attachment 20652 [details] Cleanup 5
Adam Roben (:aroben)
Comment 10 2008-04-17 16:24:13 PDT
Eric Seidel (no email)
Comment 11 2008-04-17 16:30:42 PDT
Comment on attachment 20653 [details] Fix v1 Now we just need to lower the threshold in DRT until we have all tests passing in under 5 seconds. :)
Adam Roben (:aroben)
Comment 12 2008-04-17 17:01:04 PDT
Fixed in r32029
Note You need to log in before you can comment on or make changes to this bug.