Bug 137528

Summary: [iOS] LayoutTestRelay should ensure its DRT/WKTR dies when receiving kill/term signals
Product: WebKit Reporter: David Farler <dfarler>
Component: Tools / TestsAssignee: David Farler <dfarler>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, dbates, ddkilzer, glenn, ossy, simon.fraser
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: iPhone / iPad   
OS: All   
Attachments:
Description Flags
Patch simon.fraser: review+

Description David Farler 2014-10-08 10:47:11 PDT
If a test times out, webkitpy will kill the LayoutTestRelay. However, the signal isn't forwarded to the underlying DRT/WKTR. This used to not be a problem because when LayoutTestRelay gets launched with the same arguments, launching the same app identifier in the simulator would first quit the old instance. That's no longer the case and the same DRT/WKTR instance will be sitting there still timing out. So, we need to catch a signal and kill the simulator app before dying so that it can be properly relaunched when a timeout->kill happens.
Comment 1 David Farler 2014-10-10 17:31:07 PDT
Created attachment 239661 [details]
Patch
Comment 2 Simon Fraser (smfr) 2014-10-10 17:49:09 PDT
Comment on attachment 239661 [details]
Patch

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

> Tools/LayoutTestRelay/LayoutTestRelay/main.m:103
> +    NSLog(@"FINISHING");

I don't think you want this.

> Tools/Scripts/webkitpy/common/system/executive.py:202
> +                os.kill(pid, signal.SIGTERM)

This needs a comment I think.
Comment 3 David Farler 2014-10-10 18:09:32 PDT
Committed r174628: <http://trac.webkit.org/changeset/174628>
Comment 4 Csaba Osztrogonác 2014-10-11 00:22:15 PDT
(In reply to comment #3)
> Committed r174628: <http://trac.webkit.org/changeset/174628>

It broke the related webkitpy unittest. Could you update its expected result?
Comment 5 Simon Fraser (smfr) 2014-10-11 08:48:58 PDT
This broke a python test.
Comment 6 Simon Fraser (smfr) 2014-10-11 11:07:47 PDT
I fixed this in r174634.