Bug 137662 - [iOS] LayoutTestRelay: Detect broken pipe when webkitpy cancels a run
Summary: [iOS] LayoutTestRelay: Detect broken pipe when webkitpy cancels a run
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: iPhone / iPad All
: P2 Normal
Assignee: David Farler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-13 11:28 PDT by David Farler
Modified: 2014-10-15 10:01 PDT (History)
3 users (show)

See Also:


Attachments
Patch (2.44 KB, patch)
2014-10-13 11:45 PDT, David Farler
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Farler 2014-10-13 11:28:25 PDT
Rarely, with proper timing, the LayoutTestRelay's simulator app can crash while the didReceiveStderrData and didReceiveStdoutData NSFileHandle delegate methods are running, but the pipe will be broken, so LayoutTestRelay will crash. We should catch NSFileHandleOperationException and call didCrashWithMessage, same as on the write side.

We have broken pipe coverage for:
webkitpy -> [stdin] LayoutTestRelay -> [stdin] DRT

and need coverage for:
webkitpy [stdout result] <- LayoutTestRelay [NSFileHandle] <- [stdout] DRT
webkitpy [stderr result] <- LayoutTestRelay [NSFileHandle] <- [stderr] DRT
Comment 1 David Farler 2014-10-13 11:28:38 PDT
<rdar://problem/18635888>
Comment 2 David Farler 2014-10-13 11:38:45 PDT
Actually wait, this is on the webkitpy side, so I think this might actually be the case where we timed out, or a run was cancelled, and webkitpy stopped reading our stdout/stderr. I think the proper thing to do is just exit(1) here.
Comment 3 David Farler 2014-10-13 11:45:03 PDT
Created attachment 239736 [details]
Patch
Comment 4 WebKit Commit Bot 2014-10-13 11:46:35 PDT
Attachment 239736 [details] did not pass style-queue:


ERROR: Tools/LayoutTestRelay/LayoutTestRelay/LTRelayController.m:110:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
ERROR: Tools/LayoutTestRelay/LayoutTestRelay/LTRelayController.m:110:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Tools/LayoutTestRelay/LayoutTestRelay/LTRelayController.m:122:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
ERROR: Tools/LayoutTestRelay/LayoutTestRelay/LTRelayController.m:122:  Extra space before ( in function call  [whitespace/parens] [4]
Total errors found: 4 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Darin Adler 2014-10-15 09:40:55 PDT
Comment on attachment 239736 [details]
Patch

I suggest naming the exception “exception” rather than “e”.
Comment 6 David Farler 2014-10-15 10:01:16 PDT
Committed r174728: <http://trac.webkit.org/changeset/174728>
Comment 7 David Farler 2014-10-15 10:01:33 PDT
Thanks Darin -