Bug 48744 - REGRESSION: rebaseline-chromium-webkit-tests uses non-zero tolerance for image dup detection
Summary: REGRESSION: rebaseline-chromium-webkit-tests uses non-zero tolerance for imag...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-01 01:05 PDT by Kent Tamura
Modified: 2010-11-03 04:20 PDT (History)
6 users (show)

See Also:


Attachments
Patch (4.21 KB, patch)
2010-11-01 03:45 PDT, Kent Tamura
no flags Details | Formatted Diff | Diff
Patch 2 (always tolerance=0) (4.18 KB, patch)
2010-11-01 16:05 PDT, Kent Tamura
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kent Tamura 2010-11-01 01:05:00 PDT
For example, editing/selection/transformed-selection-rects.html is failing as IMAGE on Mac, and layout-test-results.zip of the canary bot contains .png and .checksum for it.
Then, add "REBASELINE" to the line for it in test_expectations.txt and run the following:
 % rebaseline-chromium-webkit-tests -w

WIN and LINUX results are added to the local working copy, but MAC results are not added.

rebaseline-chromium-webkit-tests uses a port object for Mac (not Chromium-Mac), and port.diff_image() for Mac uses the default tolerance value 0.1.
]
Comment 1 Kent Tamura 2010-11-01 03:45:33 PDT
Created attachment 72493 [details]
Patch
Comment 2 Mihai Parparita 2010-11-01 06:17:29 PDT
Comment on attachment 72493 [details]
Patch

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

Sorry about the regression.

> WebKitTools/Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests.py:881
> +        options.tolerance = 0

Any reason why you wouldn't always set this? Before r70279, this tool was always setting tolerance to 0, which seems like the right thing to do.
Comment 3 Kent Tamura 2010-11-01 06:33:35 PDT
(In reply to comment #2)
> > WebKitTools/Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests.py:881
> > +        options.tolerance = 0
> 
> Any reason why you wouldn't always set this? Before r70279, this tool was always setting tolerance to 0, which seems like the right thing to do.

Because It seems rebaseline-chromium-webkit-tests has code to support non-Chromium port targets.  I don't know if it works.
Comment 4 Mihai Parparita 2010-11-01 06:36:02 PDT
(In reply to comment #3)
> Because It seems rebaseline-chromium-webkit-tests has code to support non-Chromium port targets.  I don't know if it works.

Ports that don't care about the tolerance setting will just ignore the field in the options object. new-run-webkit-tests always sets tolerance, it's up to each port to do something with it (only the Mac port respects it), and that hasn't been an issue.
Comment 5 Kent Tamura 2010-11-01 06:41:43 PDT
(In reply to comment #4)
> (In reply to comment #3)
> > Because It seems rebaseline-chromium-webkit-tests has code to support non-Chromium port targets.  I don't know if it works.
> 
> Ports that don't care about the tolerance setting will just ignore the field in the options object. new-run-webkit-tests always sets tolerance, it's up to each port to do something with it (only the Mac port respects it), and that hasn't been an issue.

Ah, right.
So, the ideal fix is that ImageDiff of the host port runs with the tolerance value of the target port?
Comment 6 Dirk Pranke 2010-11-01 11:54:59 PDT
Good catch. I agree with Mihai that we should use a tolerance of 0 across the board.
Comment 7 Dirk Pranke 2010-11-01 11:55:24 PDT
Meaning, I wouldn't even make it a command line option, just set it to zero in the call.
Comment 8 Kent Tamura 2010-11-01 16:05:28 PDT
Created attachment 72585 [details]
Patch 2 (always tolerance=0)
Comment 9 Kent Tamura 2010-11-01 22:17:14 PDT
Would some review this please?
Comment 10 Kent Tamura 2010-11-01 22:17:40 PDT
(In reply to comment #9)
> Would some review this please?
                someone
Comment 11 Adam Barth 2010-11-01 22:20:49 PDT
Our goal here is to match the HTML5 spec.  How does a WebKit nightly compare to Firefox 4 beta?
Comment 12 Adam Barth 2010-11-01 22:21:31 PDT
wrong bug.  :)
Comment 13 Dimitri Glazkov (Google) 2010-11-02 09:11:15 PDT
Comment on attachment 72585 [details]
Patch 2 (always tolerance=0)

ok
Comment 14 Kent Tamura 2010-11-03 04:20:28 PDT
Comment on attachment 72585 [details]
Patch 2 (always tolerance=0)

Clearing flags on attachment: 72585

Committed r71228: <http://trac.webkit.org/changeset/71228>
Comment 15 Kent Tamura 2010-11-03 04:20:37 PDT
All reviewed patches have been landed.  Closing bug.