Commit b208f11b authored by aroben@apple.com's avatar aroben@apple.com
Browse files

Don't wait for the hang timer twice in the case of a hang

        Previously we'd wait for a hang while reading both stdout and stderr
        from DRT. Now we'll only wait for one or the other.

        Reviewed by Anders Carlsson.

        * Scripts/run-webkit-tests:
        (top level): Don't wait for stderr to time out if stdout already timed
        out.
        (readFromDumpToolWithTimer): If $dontWaitForTimeOut is true, quit
        after the first read that returns no data.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32035 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent fd529cc1
2008-04-17 Adam Roben <aroben@apple.com>
Don't wait for the hang timer twice in the case of a hang
Previously we'd wait for a hang while reading both stdout and stderr
from DRT. Now we'll only wait for one or the other.
Reviewed by Anders Carlsson.
* Scripts/run-webkit-tests:
(top level): Don't wait for stderr to time out if stdout already timed
out.
(readFromDumpToolWithTimer): If $dontWaitForTimeOut is true, quit
after the first read that returns no data.
2008-04-17 Adam Roben <aroben@apple.com>
 
Don't throw away the output from timed out tests
......
......@@ -95,7 +95,7 @@ sub recordActualResultsAndDiff($$);
sub buildPlatformHierarchy();
sub epiloguesAndPrologues($$);
sub parseLeaksandPrintUniqueLeaks();
sub readFromDumpToolWithTimer(*);
sub readFromDumpToolWithTimer(*;$);
sub setFileHandleNonBlocking(*$);
# Argument handling
......@@ -558,7 +558,7 @@ for my $test (@tests) {
}
my $actualRead = readFromDumpToolWithTimer(IN);
my $errorRead = readFromDumpToolWithTimer(ERROR);
my $errorRead = readFromDumpToolWithTimer(ERROR, $actualRead->{timedout});
my $actual = $actualRead->{output};
my $error = $errorRead->{output};
......@@ -1694,9 +1694,9 @@ sub parseLeaksandPrintUniqueLeaks() {
}
sub readFromDumpToolWithTimer(*)
sub readFromDumpToolWithTimer(*;$)
{
my ($fh) = @_;
my ($fh, $dontWaitForTimeOut) = @_;
setFileHandleNonBlocking($fh, 1);
......@@ -1717,6 +1717,10 @@ sub readFromDumpToolWithTimer(*)
my $read = sysread($fh, $output, 1024, $readSoFar);
if (!defined($read) && $! == EAGAIN) {
if ($dontWaitForTimeOut) {
last;
}
# No data ready
usleep($microsecondsToWaitBeforeReadingAgain);
next;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment