From 7260d7292bde966f038b8e166f3fe41ddd8f2099 Mon Sep 17 00:00:00 2001 From: stephana Date: Fri, 5 Sep 2014 13:21:42 -0700 Subject: For certain input skpdiff segfaulted. This prevents the segfault and should fix the failed test in housekeeping. BUG=skia:2902 R=mtklein@google.com, rmistry@google.com Author: stephana@google.com Review URL: https://codereview.chromium.org/546753003 --- .../compare_rendered_pictures.json | 14 ++-- .../compare_rendered_pictures.json | 14 ++-- tools/skpdiff/SkDiffContext.cpp | 1 + tools/tests/render_pictures_test.py | 80 +++++++++++----------- 4 files changed, 55 insertions(+), 54 deletions(-) diff --git a/gm/rebaseline_server/testdata/outputs/expected/compare_rendered_pictures_test.CompareRenderedPicturesTest.test_endToEnd/compare_rendered_pictures.json b/gm/rebaseline_server/testdata/outputs/expected/compare_rendered_pictures_test.CompareRenderedPicturesTest.test_endToEnd/compare_rendered_pictures.json index afa8978de8..1ce3718bc6 100644 --- a/gm/rebaseline_server/testdata/outputs/expected/compare_rendered_pictures_test.CompareRenderedPicturesTest.test_endToEnd/compare_rendered_pictures.json +++ b/gm/rebaseline_server/testdata/outputs/expected/compare_rendered_pictures_test.CompareRenderedPicturesTest.test_endToEnd/compare_rendered_pictures.json @@ -128,7 +128,7 @@ "renderModeB" ], "header": { - "dataHash": "-5707186260478709107", + "dataHash": "-9145196899696949575", "isEditable": false, "isExported": true, "schemaVersion": 5, @@ -162,8 +162,8 @@ "tiledOrWhole": "whole", "tilenum": "N/A" }, - "imageAUrl": "changed_skp/bitmap-64bitMD5_3101044995537104462.png", - "imageBUrl": "changed_skp/bitmap-64bitMD5_13623922271964399662.png", + "imageAUrl": "changed_skp/bitmap-64bitMD5_17527938180154630042.png", + "imageBUrl": "changed_skp/bitmap-64bitMD5_2314401992566164894.png", "isDifferent": true, "sourceJsonFile": "./summary.json" }, @@ -179,7 +179,7 @@ "tilenum": "N/A" }, "imageAUrl": null, - "imageBUrl": "only-in-after_skp/bitmap-64bitMD5_2320185040577047131.png", + "imageBUrl": "only-in-after_skp/bitmap-64bitMD5_6558642089737589931.png", "isDifferent": true, "sourceJsonFile": "./summary.json" }, @@ -194,7 +194,7 @@ "tiledOrWhole": "whole", "tilenum": "N/A" }, - "imageAUrl": "only-in-before_skp/bitmap-64bitMD5_2320185040577047131.png", + "imageAUrl": "only-in-before_skp/bitmap-64bitMD5_6558642089737589931.png", "imageBUrl": null, "isDifferent": true, "sourceJsonFile": "./summary.json" @@ -210,8 +210,8 @@ "tiledOrWhole": "whole", "tilenum": "N/A" }, - "imageAUrl": "unchanged_skp/bitmap-64bitMD5_3322248763049618493.png", - "imageBUrl": "unchanged_skp/bitmap-64bitMD5_3322248763049618493.png", + "imageAUrl": "unchanged_skp/bitmap-64bitMD5_1094324242976325446.png", + "imageBUrl": "unchanged_skp/bitmap-64bitMD5_1094324242976325446.png", "isDifferent": false, "sourceJsonFile": "./summary.json" } diff --git a/gm/rebaseline_server/testdata/outputs/expected/compare_rendered_pictures_test.CompareRenderedPicturesTest.test_endToEnd_withImageBaseGSUrl/compare_rendered_pictures.json b/gm/rebaseline_server/testdata/outputs/expected/compare_rendered_pictures_test.CompareRenderedPicturesTest.test_endToEnd_withImageBaseGSUrl/compare_rendered_pictures.json index e62b5cbc63..1026014da5 100644 --- a/gm/rebaseline_server/testdata/outputs/expected/compare_rendered_pictures_test.CompareRenderedPicturesTest.test_endToEnd_withImageBaseGSUrl/compare_rendered_pictures.json +++ b/gm/rebaseline_server/testdata/outputs/expected/compare_rendered_pictures_test.CompareRenderedPicturesTest.test_endToEnd_withImageBaseGSUrl/compare_rendered_pictures.json @@ -128,7 +128,7 @@ "renderModeB" ], "header": { - "dataHash": "-5707186260478709107", + "dataHash": "-9145196899696949575", "isEditable": false, "isExported": true, "schemaVersion": 5, @@ -162,8 +162,8 @@ "tiledOrWhole": "whole", "tilenum": "N/A" }, - "imageAUrl": "changed_skp/bitmap-64bitMD5_3101044995537104462.png", - "imageBUrl": "changed_skp/bitmap-64bitMD5_13623922271964399662.png", + "imageAUrl": "changed_skp/bitmap-64bitMD5_17527938180154630042.png", + "imageBUrl": "changed_skp/bitmap-64bitMD5_2314401992566164894.png", "isDifferent": true, "sourceJsonFile": "./summary.json" }, @@ -179,7 +179,7 @@ "tilenum": "N/A" }, "imageAUrl": null, - "imageBUrl": "only-in-after_skp/bitmap-64bitMD5_2320185040577047131.png", + "imageBUrl": "only-in-after_skp/bitmap-64bitMD5_6558642089737589931.png", "isDifferent": true, "sourceJsonFile": "./summary.json" }, @@ -194,7 +194,7 @@ "tiledOrWhole": "whole", "tilenum": "N/A" }, - "imageAUrl": "only-in-before_skp/bitmap-64bitMD5_2320185040577047131.png", + "imageAUrl": "only-in-before_skp/bitmap-64bitMD5_6558642089737589931.png", "imageBUrl": null, "isDifferent": true, "sourceJsonFile": "./summary.json" @@ -210,8 +210,8 @@ "tiledOrWhole": "whole", "tilenum": "N/A" }, - "imageAUrl": "unchanged_skp/bitmap-64bitMD5_3322248763049618493.png", - "imageBUrl": "unchanged_skp/bitmap-64bitMD5_3322248763049618493.png", + "imageAUrl": "unchanged_skp/bitmap-64bitMD5_1094324242976325446.png", + "imageBUrl": "unchanged_skp/bitmap-64bitMD5_1094324242976325446.png", "isDifferent": false, "sourceJsonFile": "./summary.json" } diff --git a/tools/skpdiff/SkDiffContext.cpp b/tools/skpdiff/SkDiffContext.cpp index 78d8400968..4248ca3b56 100644 --- a/tools/skpdiff/SkDiffContext.cpp +++ b/tools/skpdiff/SkDiffContext.cpp @@ -289,6 +289,7 @@ void SkDiffContext::diffPatterns(const char baselinePattern[], const char testPa runnableDiffs[x].setup(this, baselineEntries[x], testEntries[x]); tg.add(&runnableDiffs[x]); } + tg.wait(); } void SkDiffContext::outputRecords(SkWStream& stream, bool useJSONP) { diff --git a/tools/tests/render_pictures_test.py b/tools/tests/render_pictures_test.py index 6daadd8b08..9a2dd72bac 100755 --- a/tools/tests/render_pictures_test.py +++ b/tools/tests/render_pictures_test.py @@ -36,7 +36,7 @@ EXPECTED_HEADER_CONTENTS = { # the comparison. RED_WHOLEIMAGE = { "checksumAlgorithm" : "bitmap-64bitMD5", - "checksumValue" : 11092453015575919668, + "checksumValue" : 2853310525600416231, "comparisonResult" : "failed", "filepath" : "red_skp.png", } @@ -46,7 +46,7 @@ RED_WHOLEIMAGE = { # the comparison. GREEN_WHOLEIMAGE = { "checksumAlgorithm" : "bitmap-64bitMD5", - "checksumValue" : 8891695120562235492, + "checksumValue" : 11143979097452425335, "comparisonResult" : "succeeded", "filepath" : "green_skp.png", } @@ -68,22 +68,22 @@ RED_TILES = [{ "filepath" : "red_skp-tile1.png", }, { "checksumAlgorithm" : "bitmap-64bitMD5", - "checksumValue" : 16670399404877552232, + "checksumValue" : 15939355025996362179, "comparisonResult" : "failed", "filepath" : "red_skp-tile2.png", }, { "checksumAlgorithm" : "bitmap-64bitMD5", - "checksumValue" : 2507897274083364964, + "checksumValue" : 649771916797529222, "comparisonResult" : "failed", "filepath" : "red_skp-tile3.png", }, { "checksumAlgorithm" : "bitmap-64bitMD5", - "checksumValue" : 7325267995523877959, + "checksumValue" : 8132820002266077288, "comparisonResult" : "failed", "filepath" : "red_skp-tile4.png", }, { "checksumAlgorithm" : "bitmap-64bitMD5", - "checksumValue" : 2181381724594493116, + "checksumValue" : 2406160701181324581, "comparisonResult" : "failed", "filepath" : "red_skp-tile5.png", }] @@ -105,22 +105,22 @@ GREEN_TILES = [{ "filepath" : "green_skp-tile1.png", }, { "checksumAlgorithm" : "bitmap-64bitMD5", - "checksumValue" : 5686489729535631913, + "checksumValue" : 11866144860997809880, "comparisonResult" : "succeeded", "filepath" : "green_skp-tile2.png", }, { "checksumAlgorithm" : "bitmap-64bitMD5", - "checksumValue" : 7980646035555096146, + "checksumValue" : 3893392565127823822, "comparisonResult" : "succeeded", "filepath" : "green_skp-tile3.png", }, { "checksumAlgorithm" : "bitmap-64bitMD5", - "checksumValue" : 17817086664365875131, + "checksumValue" : 2083084978343901738, "comparisonResult" : "succeeded", "filepath" : "green_skp-tile4.png", }, { "checksumAlgorithm" : "bitmap-64bitMD5", - "checksumValue" : 10673669813016809363, + "checksumValue" : 89620927366502076, "comparisonResult" : "succeeded", "filepath" : "green_skp-tile5.png", }] @@ -385,20 +385,20 @@ class RenderPicturesTest(base_unittest.TestCase): # Manually verified: 640x400 red rectangle with black border "whole-image": { "checksumAlgorithm" : "bitmap-64bitMD5", - "checksumValue" : 11092453015575919668, + "checksumValue" : 2853310525600416231, "comparisonResult" : "no-comparison", "filepath" : - "red_skp/bitmap-64bitMD5_11092453015575919668.png", + "red_skp/bitmap-64bitMD5_2853310525600416231.png", }, }, "green.skp": { # Manually verified: 640x400 green rectangle with black border "whole-image": { "checksumAlgorithm" : "bitmap-64bitMD5", - "checksumValue" : 8891695120562235492, + "checksumValue" : 11143979097452425335, "comparisonResult" : "no-comparison", "filepath" : - "green_skp/bitmap-64bitMD5_8891695120562235492.png", + "green_skp/bitmap-64bitMD5_11143979097452425335.png", }, } } @@ -407,10 +407,10 @@ class RenderPicturesTest(base_unittest.TestCase): self._assert_directory_contents(write_path_dir, ['red_skp', 'green_skp']) self._assert_directory_contents( os.path.join(write_path_dir, 'red_skp'), - ['bitmap-64bitMD5_11092453015575919668.png']) + ['bitmap-64bitMD5_2853310525600416231.png']) self._assert_directory_contents( os.path.join(write_path_dir, 'green_skp'), - ['bitmap-64bitMD5_8891695120562235492.png']) + ['bitmap-64bitMD5_11143979097452425335.png']) def test_untiled_validate(self): """Same as test_untiled, but with --validate.""" @@ -545,28 +545,28 @@ class RenderPicturesTest(base_unittest.TestCase): "red_skp/bitmap-64bitMD5_9323613075234140270.png", }, { "checksumAlgorithm" : "bitmap-64bitMD5", - "checksumValue" : 16670399404877552232, + "checksumValue" : 15939355025996362179, "comparisonResult" : "no-comparison", "filepath" : - "red_skp/bitmap-64bitMD5_16670399404877552232.png", + "red_skp/bitmap-64bitMD5_15939355025996362179.png", }, { "checksumAlgorithm" : "bitmap-64bitMD5", - "checksumValue" : 2507897274083364964, + "checksumValue" : 649771916797529222, "comparisonResult" : "no-comparison", "filepath" : - "red_skp/bitmap-64bitMD5_2507897274083364964.png", + "red_skp/bitmap-64bitMD5_649771916797529222.png", }, { "checksumAlgorithm" : "bitmap-64bitMD5", - "checksumValue" : 7325267995523877959, + "checksumValue" : 8132820002266077288, "comparisonResult" : "no-comparison", "filepath" : - "red_skp/bitmap-64bitMD5_7325267995523877959.png", + "red_skp/bitmap-64bitMD5_8132820002266077288.png", }, { "checksumAlgorithm" : "bitmap-64bitMD5", - "checksumValue" : 2181381724594493116, + "checksumValue" : 2406160701181324581, "comparisonResult" : "no-comparison", "filepath" : - "red_skp/bitmap-64bitMD5_2181381724594493116.png", + "red_skp/bitmap-64bitMD5_2406160701181324581.png", }], }, "green.skp": { @@ -587,28 +587,28 @@ class RenderPicturesTest(base_unittest.TestCase): "green_skp/bitmap-64bitMD5_7624374914829746293.png", }, { "checksumAlgorithm" : "bitmap-64bitMD5", - "checksumValue" : 5686489729535631913, + "checksumValue" : 11866144860997809880, "comparisonResult" : "no-comparison", "filepath" : - "green_skp/bitmap-64bitMD5_5686489729535631913.png", + "green_skp/bitmap-64bitMD5_11866144860997809880.png", }, { "checksumAlgorithm" : "bitmap-64bitMD5", - "checksumValue" : 7980646035555096146, + "checksumValue" : 3893392565127823822, "comparisonResult" : "no-comparison", "filepath" : - "green_skp/bitmap-64bitMD5_7980646035555096146.png", + "green_skp/bitmap-64bitMD5_3893392565127823822.png", }, { "checksumAlgorithm" : "bitmap-64bitMD5", - "checksumValue" : 17817086664365875131, + "checksumValue" : 2083084978343901738, "comparisonResult" : "no-comparison", "filepath" : - "green_skp/bitmap-64bitMD5_17817086664365875131.png", + "green_skp/bitmap-64bitMD5_2083084978343901738.png", }, { "checksumAlgorithm" : "bitmap-64bitMD5", - "checksumValue" : 10673669813016809363, + "checksumValue" : 89620927366502076, "comparisonResult" : "no-comparison", "filepath" : - "green_skp/bitmap-64bitMD5_10673669813016809363.png", + "green_skp/bitmap-64bitMD5_89620927366502076.png", }], } } @@ -619,18 +619,18 @@ class RenderPicturesTest(base_unittest.TestCase): os.path.join(write_path_dir, 'red_skp'), ['bitmap-64bitMD5_5815827069051002745.png', 'bitmap-64bitMD5_9323613075234140270.png', - 'bitmap-64bitMD5_16670399404877552232.png', - 'bitmap-64bitMD5_2507897274083364964.png', - 'bitmap-64bitMD5_7325267995523877959.png', - 'bitmap-64bitMD5_2181381724594493116.png']) + 'bitmap-64bitMD5_15939355025996362179.png', + 'bitmap-64bitMD5_649771916797529222.png', + 'bitmap-64bitMD5_8132820002266077288.png', + 'bitmap-64bitMD5_2406160701181324581.png']) self._assert_directory_contents( os.path.join(write_path_dir, 'green_skp'), ['bitmap-64bitMD5_12587324416545178013.png', 'bitmap-64bitMD5_7624374914829746293.png', - 'bitmap-64bitMD5_5686489729535631913.png', - 'bitmap-64bitMD5_7980646035555096146.png', - 'bitmap-64bitMD5_17817086664365875131.png', - 'bitmap-64bitMD5_10673669813016809363.png']) + 'bitmap-64bitMD5_11866144860997809880.png', + 'bitmap-64bitMD5_3893392565127823822.png', + 'bitmap-64bitMD5_2083084978343901738.png', + 'bitmap-64bitMD5_89620927366502076.png']) def _run_render_pictures(self, args): binary = find_run_binary.find_path_to_program('render_pictures') -- cgit v1.2.3