Bug 137528 - [iOS] LayoutTestRelay should ensure its DRT/WKTR dies when receiving kill/term signals
Summary: [iOS] LayoutTestRelay should ensure its DRT/WKTR dies when receiving kill/ter...
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-08 10:47 PDT by David Farler
Modified: 2014-10-11 11:07 PDT (History)
6 users (show)

See Also:


Attachments
Patch (4.08 KB, patch)
2014-10-10 17:31 PDT, David Farler
simon.fraser: 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-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.