Bug 28336 - Can no longer --reset-results of a layout test directory
Summary: Can no longer --reset-results of a layout test directory
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-14 22:30 PDT by Dave Hyatt
Modified: 2009-08-17 17:49 PDT (History)
2 users (show)

See Also:


Attachments
Patch v1 (1.76 KB, patch)
2009-08-17 14:02 PDT, Eric Seidel (no email)
no flags Details | Formatted Diff | Diff
Updated to fix first-test failure case too (1.91 KB, patch)
2009-08-17 14:17 PDT, Eric Seidel (no email)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dave Hyatt 2009-08-14 22:30:19 PDT
I get error spew when  I try to reset results of a directory.... commenting out lines 997-1002 in run-webkit-tests fixes the issue.
Comment 1 Mark Rowe (bdash) 2009-08-14 22:40:52 PDT
Seems like this could happen if the first test that is run happens to fail?
Comment 2 Eric Seidel (no email) 2009-08-14 23:03:37 PDT
I'll investigate on Monday.  Away for the weekend.  You're welcome to roll out the change if needed.
Comment 3 Eric Seidel (no email) 2009-08-17 14:02:08 PDT
Created attachment 34990 [details]
Patch v1
Comment 4 Eric Seidel (no email) 2009-08-17 14:03:32 PDT
The problem was that I had assumed all modes of run-webkit-tests used the %counts dictionary.  It turns out %counts is not used when --reset-results is true.  I've fixed the code to ignore --exit-after-n-failures in the case of --reset-results.

Sorry for the trouble Dave.
Comment 5 Mark Rowe (bdash) 2009-08-17 14:06:05 PDT
The code still seems as though it will not do the right thing if $counts{match} is undefined.  At the least it will emit a diagnostic.  As I mentioned in an earlier comment, this look as though it could happen if the first tests fails.  Am I missing something?
Comment 6 Eric Seidel (no email) 2009-08-17 14:11:46 PDT
You are correct it happens when the first test fails too.

foo.html -> new (results generated in /Users/eseidel/Projects/WebKit2/LayoutTests/platform/mac)
Use of uninitialized value in subtraction (-) at WebKitTools/Scripts/run-webkit-tests line 999.

Exiting early after 1 failures.  1 tests run.

I'll update the patch.
Comment 7 Eric Seidel (no email) 2009-08-17 14:17:05 PDT
Created attachment 34991 [details]
Updated to fix first-test failure case too
Comment 8 Eric Seidel (no email) 2009-08-17 14:17:38 PDT
Thanks for the catch.  I've updated the patch to handle the case where the first test fails as well.
Comment 9 Eric Seidel (no email) 2009-08-17 17:49:20 PDT
Comment on attachment 34991 [details]
Updated to fix first-test failure case too

Clearing flags on attachment: 34991

Committed r47402: <http://trac.webkit.org/changeset/47402>
Comment 10 Eric Seidel (no email) 2009-08-17 17:49:26 PDT
All reviewed patches have been landed.  Closing bug.