Bug 28336

Summary: Can no longer --reset-results of a layout test directory
Product: WebKit Reporter: Dave Hyatt <hyatt>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Severity: Normal CC: eric, mrowe
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Description Flags
Patch v1
Updated to fix first-test failure case too none

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.