[webkit-dev] run-webkit-tests question; hashes when comparing ref test output
Alexey Proskuryakov
ap at webkit.org
Thu Jan 22 11:48:04 PST 2015
22 янв. 2015 г., в 11:30, Simon Fraser <simon.fraser at apple.com> написал(а):
> This happens when the expected and actual images are very close, but not identical. ImageDiff has some built-in rounding that effectively acts as a small tolerance, so the hashes are different, but ImageDiff incorrectly says the images are the same. For example, some of the tests in question render a green box either via CALayers, or by painting, and there’s a slight color difference between the two code paths.
>
> My preference for how to fix this would be to fix ImageDiff to remove its slight built-in tolerance, and then to expose testRunner API to allow a test to set an explicit tolerance. There are many cases where we’d like to use ref tests, but are unable to because of slight, justifiable rendering differences, and having an explicit tolerance would permit the use of ref tests in these cases.
One thing about tolerance is that it is super confusing - are we talking about the number of pixels that are different, or about how different the pixels are? Also, a lot of failures only cause small differences in pixel results. Even a 100x100 box that becomes red instead of green is only a small portion of the 800x600 image, and it's even more the case for tests that check e.g. text rendering.
It is not currently known what the root causes are for the tests that say "ref test hashes didn't match but diff passed". Given that the differences are very tiny, one guess is that even though compositing and non-compositing code paths are mathematically equivalent, there are different rendering steps taken, and rounding at each step adds up to slight differences. Another theory is that we have actual bugs, such as with color management.
If it's just rounding differences, then the right thing to do is probably to silence the console output, keeping behavior the same otherwise.
- Alexey
More information about the webkit-dev
mailing list