Bug 95710

Summary: [nrwt] Harden against empty stdout/stderr after stopping a crashed/timed out driver
Product: WebKit Reporter: Balazs Kelemen <kbalazs>
Component: Tools / TestsAssignee: Balazs Kelemen <kbalazs>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, dpranke, ojan, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Balazs Kelemen 2012-09-03 23:02:05 PDT
It has been revealed when I tested a patch that makes a lot of tests failing. In driver.run_test an exception can raise here: 

if stop_when_done or crashed or timed_out:
    # We call stop() even if we crashed or timed out in order to get any remaining stdout/stderr output.
    # In the timeout case, we kill the hung process as well.
    out, err = self._server_process.stop(self._port.driver_stop_timeout() if stop_when_done else 0.0)
    text += out
    self.error_from_test += err

at the += if out or err is None.

Although it probably not shown on trunk we should make sure the harness can handle a driver in a bad state.
Comment 1 Balazs Kelemen 2012-09-03 23:06:13 PDT
Created attachment 161968 [details]
Patch
Comment 2 Balazs Kelemen 2012-09-06 06:20:50 PDT
Comment on attachment 161968 [details]
Patch

Clearing flags on attachment: 161968

Committed r127734: <http://trac.webkit.org/changeset/127734>
Comment 3 Balazs Kelemen 2012-09-06 06:20:54 PDT
All reviewed patches have been landed.  Closing bug.