RE: [PHP-CVS] com php-src: Make tests a little more resilient:ext/gd/tests/bug22544.phpt ext/gd/tests/bug43828.phptext/gd/tests/bug72604.phpt
ext/gd/tests/imagearc_basic.phptext/gd/tests/imagearc_error1.phpt ext/gd/tests/imagearc_variation1.phptext/gd

From: Date: Thu, 01 Sep 2016 23:00:59 +0000
Subject: RE: [PHP-CVS] com php-src: Make tests a little more resilient:ext/gd/tests/bug22544.phpt ext/gd/tests/bug43828.phptext/gd/tests/bug72604.phpt
ext/gd/tests/imagearc_basic.phptext/gd/tests/imagearc_error1.phpt ext/gd/tests/imagearc_variation1.phptext/gd
References: 1 2 3  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-94242@lists.php.net to get a copy of this message
Hi Christoph, > -----Original Message----- > From: Christoph M. Becker [mailto:cmbecker69@gmx.de] > Sent: Wednesday, August 31, 2016 12:44 AM > To: Anatol Belski <anatol.php@belski.net>; php-cvs@lists.php.net > Cc: Pierre Joye <pierre.php@gmail.com> > Subject: Re: [PHP-CVS] com php-src: Make tests a little more > resilient:ext/gd/tests/bug22544.phpt > ext/gd/tests/bug43828.phptext/gd/tests/bug72604.phpt > ext/gd/tests/imagearc_basic.phptext/gd/tests/imagearc_error1.phpt > ext/gd/tests/imagearc_variation1.phptext/gd > > On 30.08.2016 at 19:20, Christoph M. Becker wrote: > > > > On 30.08.2016 at 18:33, Anatol Belski wrote: > >> > >>> -----Original Message----- > >>> From: Christoph Michael Becker [mailto:cmb@php.net] > >>> Sent: Wednesday, August 17, 2016 6:00 PM > >>> To: php-cvs@lists.php.net > >>> Subject: [PHP-CVS] com php-src: Make tests a little more resilient: > >>> ext/gd/tests/bug22544.phpt ext/gd/tests/bug43828.phpt > >>> ext/gd/tests/bug72604.phpt ext/gd/tests/imagearc_basic.phpt > >>> ext/gd/tests/imagearc_error1.phpt > >>> ext/gd/tests/imagearc_variation1.phpt > >>> ext/gd/tes > >>> > >>> Commit: a3159d29bb24d5c946c14b7aa33e96bebcd56e59 > >>> Author: Christoph M. Becker <cmbecker69@gmx.de> Wed, 17 Aug > 2016 > >>> 17:59:33 +0200 > >>> Parents: 48198e4c257825ab89ee027bff5a93fc2cd59601 > >>> Branches: PHP-5.6 PHP-7.0 PHP-7.1 master > >>> > >>> Link: http://git.php.net/?p=php- > >>> src.git;a=commitdiff;h=a3159d29bb24d5c946c14b7aa33e96bebcd56e59 > >>> > >>> Log: > >>> Make tests a little more resilient > >>> > >>> PNG allows identical images to be stored differently what makes > >>> nearly all tests checking the MD5 hash of the PNG representation > >>> fail with external libgd. For now, we use the GD format instead, which > doesn't allow for such differences. > >>> > >>> Of course, this md5() checking should be replaced by a image diffing > >>> feature in the long run. > >> > >> I've got these fails at least in 7.0 x64 > >> > >> TEST 1/3 > >> [C:\php-sdk\php70\vc14\x64\php-src\ext\gd\tests\imagecolorallocatealp > >> ha_basic.phpt] > >> ========DIFF======== > >> 001+ string(32) "d776984f1a2ce89be189bd16db303427" > >> 001- string(32) "0981ef94ee2209a8dccb59aa8ad07e18" > >> ========DONE======== > >> FAIL Testing imagecolorallocatealpha() > >> [C:\php-sdk\php70\vc14\x64\php-src\ext\gd\tests\imagecolorallocatealp > >> ha_basic.phpt] TEST 2/3 > >> [C:\php-sdk\php70\vc14\x64\php-src\ext\gd\tests\imageconvolution_basi > >> c.phpt] > >> ========DIFF======== > >> 001+ 0b35b0ded5e20eff78f4cd7850579dab > >> 001- 20979b45f8772cdbd78262af4e332638 ========DONE======== FAIL > >> Testing imageconvolution() of GD library > >> [C:\php-sdk\php70\vc14\x64\php-src\ext\gd\tests\imageconvolution_basi > >> c.phpt] TEST 3/3 > >> [C:\php-sdk\php70\vc14\x64\php-src\ext\gd\tests\libgd00100.phpt] > >> ========DIFF======== > >> 001+ 155d2437ff8000e68ae703ff198ad926 > >> 001- df7253c765280396f303166f10ba9283 ========DONE======== > >> > >> Seems to be related to the test changes in this or the decsendant commits. > Could you please check? > > > > Indeed, on Windows the tests are failing. A quick check indicates > > that > > imagegd() doesn't behave identical. I'll investigate right away. > > Well, imagegd() behaves rather unexpected for truecolor images. Even though > the GD image format is able to store truecolor images[1], the PHP binding > converts these to palette images using dithering[2], which is system > dependent[3]. The few failing tests on Windows already hint at this problem, > but on other systems more/other tests might fail. > > The cleanest solution would be to change the PHP binding to not convert to > palette, but that obviously would break BC, and there still might be a problem > when saving truecolor images in GD format[4]. > > Reverting back the commit (i.e. comparing the PNG hashes instead of the GD > hashes) would solve the test failures for the bundled libgd, but would leave > several failures with external libgd. > > Switching to output in GD2 image format might also exhibit system dependent > behavior (I'm not sure, but GD2 allows for zlib compression…) > > Perhaps PR #1949[5] should be considered to be merged into PHP-5.6+? > > Thoughts? > Thanks for figuring this out. IMO overwhelming the platform dependency were worth it pursuing. If #1949 fixes the test issue and doesn't break, probably were fine. Otherwise, If there's no fix without breakage is possible, for stable branches it'd be fine to fork the failing tests preserving the old behavior. Regards Anatol

« previous php.cvs (#94242) next »