Bug 52927 - nrwt: handle broken pipe errors from DRT more cleanly
Summary: nrwt: handle broken pipe errors from DRT more cleanly
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Dirk Pranke
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-21 15:01 PST by Dirk Pranke
Modified: 2011-02-03 20:07 PST (History)
4 users (show)

See Also:


Attachments
Patch (1.32 KB, patch)
2011-01-21 15:02 PST, Dirk Pranke
no flags Details | Formatted Diff | Diff
add unit test for broken pipes (4.56 KB, patch)
2011-02-02 17:49 PST, Dirk Pranke
tony: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Pranke 2011-01-21 15:01:07 PST
nrwt: handle broken pipe errors from DRT more cleanly
Comment 1 Dirk Pranke 2011-01-21 15:02:09 PST
Created attachment 79799 [details]
Patch
Comment 2 Eric Seidel (no email) 2011-01-22 15:10:01 PST
Comment on attachment 79799 [details]
Patch

Looks reasonable.  Seems we should have a test though.
Comment 3 Dirk Pranke 2011-01-23 10:22:11 PST
I thought about this a fair amount before uploading the patch, and it's not clear to me how to usefully test this. To do so either requires spawning off a process that crashes at exactly the right point (since most of the time I'll pick up the crash during the read loop) or mocking out several layers of calls, which seems overly contrived and kind of pointless. 

I'm open to suggestions, though; any ideas on how you would test it?
Comment 4 Eric Seidel (no email) 2011-01-23 11:09:22 PST
Comment on attachment 79799 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=79799&action=review

> Tools/Scripts/webkitpy/layout_tests/port/server_process.py:119
> +            self._proc.stdin.write(input)

Oh, I had assumed one would just mock the multiple layers.  I don't know how much other mocking has already been done for testing this class.
Comment 5 Dirk Pranke 2011-02-02 17:49:28 PST
Created attachment 81015 [details]
add unit test for broken pipes
Comment 6 Dirk Pranke 2011-02-03 20:07:20 PST
Committed r77592: <http://trac.webkit.org/changeset/77592>