RESOLVED FIXED 57783
[chromium] don't write .checksum files if a fallback platform has an embedded checksum
https://bugs.webkit.org/show_bug.cgi?id=57783
Summary [chromium] don't write .checksum files if a fallback platform has an embedded...
Tony Chang
Reported 2011-04-04 13:26:59 PDT
[chromium] don't write .checksum files if a fallback platform has an embedded checksum
Attachments
Patch (5.27 KB, patch)
2011-04-04 13:27 PDT, Tony Chang
no flags
Patch (5.81 KB, patch)
2011-04-04 13:58 PDT, Tony Chang
ojan: review+
Tony Chang
Comment 1 2011-04-04 13:27:41 PDT
Tony Chang
Comment 2 2011-04-04 13:32:13 PDT
The bug is as follows: 1) The rebaseline tool writes a png results for win-xp 2) The rebaseline tool deletes the checksum result for win-xp, since it's not needed 3) The rebaseline tool tries to write a png result for win-vista. Since it matches the win-xp result, it does nothing. 4) The rebaseline tool writes a checksum result for win-vista, but since there's no win-xp checksum, it goes ahead and writes the file. The result is there's a .checksum file in win-vista that matches the .png file in win-xp. We shouldn't write the .checksum file. The patch fixes the bug by checking the fallback .png list rather than just checking for win-vista's .png.
Tony Chang
Comment 3 2011-04-04 13:42:57 PDT
(In reply to comment #2) Dirk tells me I described the fallback wrong. Here's a version without platforms but with directories instead: 1) The rebaseline tool writes a png results in chromium-win 2) The rebaseline tool deletes the checksum result for chromium-win, since it's not needed 3) The rebaseline tool tries to write a png result for chromium-win-vista. Since it matches the chromium-win result, it does nothing. 4) The rebaseline tool writes a checksum result for chromium-win-vista, but since there's no chromium-win checksum, it goes ahead and writes the file.
Dirk Pranke
Comment 4 2011-04-04 13:52:57 PDT
Comment on attachment 88114 [details] Patch LGTM. View in context: https://bugs.webkit.org/attachment.cgi?id=88114&action=review > Tools/Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests.py:435 > + Nit: Can you pull this into a separate routine called png_for_checksum() or something like that to help clarify what's going on?
Tony Chang
Comment 5 2011-04-04 13:58:27 PDT
Dirk Pranke
Comment 6 2011-04-04 13:59:38 PDT
(In reply to comment #5) > Created an attachment (id=88118) [details] > Patch LGTM.
Tony Chang
Comment 7 2011-04-04 14:00:23 PDT
Comment on attachment 88114 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=88114&action=review >> Tools/Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests.py:435 >> + png_fullpath = fs.join(all_baselines[0][0], all_baselines[0][1]) >> + > > Nit: Can you pull this into a separate routine called png_for_checksum() or something like that to help clarify what's going on? Done. Note: Code like this is why I hate returning tuples.
Dirk Pranke
Comment 8 2011-04-04 14:21:52 PDT
(In reply to comment #7) > (From update of attachment 88114 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=88114&action=review > > >> Tools/Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests.py:435 > >> + png_fullpath = fs.join(all_baselines[0][0], all_baselines[0][1]) > >> + > > > > Nit: Can you pull this into a separate routine called png_for_checksum() or something like that to help clarify what's going on? > > Done. Note: Code like this is why I hate returning tuples. It looks like expected_baselines() could and probably should be rewritten to only return a list of full paths to the tests, and then maybe we provide another helper function like baseline_dir_for_test() or something. That would probably clean things up somewhat. I know this code used to be more convoluted in the past and it can probably be made a fair amount simpler.
Tony Chang
Comment 9 2011-04-04 16:31:09 PDT
Note You need to log in before you can comment on or make changes to this bug.