Bug 35055 - SingleTestThread and TestShellThread should share more code
Summary: SingleTestThread and TestShellThread should share more code
Status: RESOLVED WONTFIX
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: Eric Seidel (no email)
URL:
Keywords:
Depends on:
Blocks: 34984
  Show dependency treegraph
 
Reported: 2010-02-17 13:40 PST by Eric Seidel (no email)
Modified: 2010-05-07 20:05 PDT (History)
3 users (show)

See Also:


Attachments
Patch (11.51 KB, patch)
2010-02-17 13:41 PST, Eric Seidel (no email)
abarth: review+
commit-queue: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2010-02-17 13:40:36 PST
SingleTestThread and TestShellThread should share more code
Comment 1 Eric Seidel (no email) 2010-02-17 13:41:26 PST
Created attachment 48933 [details]
Patch
Comment 2 Eric Seidel (no email) 2010-02-17 13:49:49 PST
I did this because I was looking at adding support for dumping out the "list of prior test" for any test which fails.

Many of our current failures are caused by test interactions.  Knowing which tests were run leading up to a specific failure will help us narrow down those failures.
Comment 3 Ojan Vafai 2010-02-17 13:53:52 PST
Comment on attachment 48933 [details]
Patch

> +# FIXME: Why do we need a separate class to handle --singly?  Can't we just use many
> +# TestShellThreads and only feed each one test?
> +class SingleTestThread(TestThread):

Actually, now that I look more closely at this, I'm not even sure we need that. What's weird right now is that SingleTestThread is spawned from TestShellThread. It's not clear to me why _run_test_singly doesn't just kill testshell/drt and then start it up again.

Anyways, it's a FIXME. Otherwise, LGTM.
Comment 4 Dirk Pranke 2010-02-17 17:10:10 PST
please reformat this to stay within 80 columns as per the PEP 8 style guide :)

I think this patch is safe, but is basically rearranging ugly code. You put a FIXME in somewhere to just collapse the two classes, and I agree that that would probably be a better way to fix this. Is there some reason you're not doing that as part of this patch?

Also, I believe this --run-singly option is only used by the valgrind bots (presumably to help ensure clean test runs); you might put a comment into the code somewhere to indicate this, so people can understand why we need this option at all.
Comment 5 Adam Barth 2010-02-17 23:58:36 PST
Comment on attachment 48933 [details]
Patch

I'm mostly relying on Ojan and Dirk here, but this looks reasonable to me.  Please fix the pep8 nits before landing.

(We really need to integrate pep8 into the style elf.)
Comment 6 Eric Seidel (no email) 2010-02-19 16:23:08 PST
Attachment 48933 [details] was posted by a committer and has review+, assigning to Eric Seidel for commit.
Comment 7 Eric Seidel (no email) 2010-03-24 19:58:54 PDT
Wow.  I doubt this still even applies.
Comment 8 Eric Seidel (no email) 2010-03-24 19:59:24 PDT
Comment on attachment 48933 [details]
Patch

We'll see what the cq says.
Comment 9 WebKit Commit Bot 2010-03-25 00:16:53 PDT
Comment on attachment 48933 [details]
Patch

Rejecting patch 48933 from commit-queue.

Failed to run "['/Users/eseidel/Projects/CommitQueue/WebKitTools/Scripts/svn-apply', '--reviewer', 'Adam Barth', '--force']" exit_code: 1
Last 500 characters of output:
itpy/layout_tests/layout_package/test_shell_thread.py
Hunk #1 FAILED at 48.
Hunk #2 succeeded at 62 (offset 3 lines).
Hunk #3 succeeded at 143 (offset 3 lines).
Hunk #4 FAILED at 156.
Hunk #5 succeeded at 180 (offset 3 lines).
Hunk #6 succeeded at 276 with fuzz 1 (offset 3 lines).
Hunk #7 succeeded at 287 (offset 3 lines).
Hunk #8 succeeded at 412 (offset 3 lines).
2 out of 8 hunks FAILED -- saving rejects to file WebKitTools/Scripts/webkitpy/layout_tests/layout_package/test_shell_thread.py.rej

Full output: http://webkit-commit-queue.appspot.com/results/1203028
Comment 10 Eric Seidel (no email) 2010-05-07 20:05:15 PDT
This patch is too out of date to save.  I'll redo this at a later date.