Skip Menu |

This queue is for tickets about the Image-Scale CPAN distribution.

Report information
The Basics
Id: 112217
Status: new
Priority: 0/
Queue: Image-Scale

People
Owner: Nobody in particular
Requestors: KENTNL [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.11
Fixed in: (no value)



Subject: t/gif.t randomly fails

gif.t randomly fails with "cannot write PNG".

However, this is impossible to reproduce under verbose test output, suggesting that the trigger conditions are CPU performance limited.

This is probably related to the block of code in gif.t that does "rmtree $FindBin/tmp", which also means t/gif.t cannot be run in parallel with any other test that works in tmp/

$ grep 'rmtree' -r t/
t/bmp.t:    File::Path::rmtree($tmpdir);
t/bmp.t:    File::Path::rmtree($tmpdir);
t/gif.t:    File::Path::rmtree($tmpdir);
t/gif.t:    File::Path::rmtree($tmpdir);
t/jpeg.t:    File::Path::rmtree($tmpdir);
t/jpeg.t:    File::Path::rmtree($tmpdir);
t/png.t:    File::Path::rmtree($tmpdir);
t/png.t:    File::Path::rmtree($tmpdir);

But the rest I can't reproduce failure cases with independently, so solving this bug first is probably going to help.

 

 prove -blr t/gif.t
t/gif.t .. 1/18 # giflib version: 5.1
t/gif.t .. ok     
All tests successful.
Files=1, Tests=18,  0 wallclock secs ( 0.03 usr  0.00 sys +  0.06 cusr  0.01 csys =  0.10 CPU)
Result: PASS


 prove -blr t/gif.t
t/gif.t .. 1/18 Image::Scale cannot write PNG with no output data
# Looks like you planned 18 tests but ran 6.
# Looks like your test exited with 25 just after 6.
t/gif.t .. Dubious, test returned 25 (wstat 6400, 0x1900)
Failed 12/18 subtests

Test Summary Report
-------------------
t/gif.t (Wstat: 6400 Tests: 6 Failed: 0)
  Non-zero exit status: 25
  Parse errors: Bad plan.  You planned 18 tests but ran 6.
Files=1, Tests=6,  0 wallclock secs ( 0.02 usr  0.01 sys +  0.03 cusr  0.01 csys =  0.07 CPU)
Result: FAIL
 

Subject: log.txt
$ perl Makefile.PL Image::Scale will be built with: JPEG support: yes (/usr/include, libjpeg version unknown) PNG support: yes (/usr/include, libpng version unknown) GIF support: yes (/usr/include, giflib version 5.1) Checking if your kit is complete... Looks good Generating a Unix-style Makefile Writing Makefile for Image::Scale Writing MYMETA.yml and MYMETA.json $ make cp lib/Image/Scale.pm blib/lib/Image/Scale.pm Running Mkbootstrap for Image::Scale () chmod 644 "Scale.bs" "/home/kent/perl5/perlbrew/perls/5.22.1-nossp-sdbm-nopmc/bin/perl" "/home/kent/perl5/perlbrew/perls/5.22.1-nossp-sdbm-nopmc/lib/5.22.1/ExtUtils/xsubpp" -typemap "/home/kent/perl5/perlbrew/perls/5.22.1-nossp-sdbm-nopmc/lib/5.22.1/ExtUtils/typemap" -typemap "typemap" Scale.xs > Scale.xsc && mv Scale.xsc Scale.c cc -c -I. -I.. -Isrc -Iinclude -I/usr/include -I/usr/include -I/usr/include -fno-stack-protector -DPERL_HASH_FUNC_SDBM -DPERL_DISABLE_PMC -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fno-stack-protector -O3 -march=native -mtune=native -DVERSION=\"0.11\" -DXS_VERSION=\"0.11\" -fPIC "-I/home/kent/perl5/perlbrew/perls/5.22.1-nossp-sdbm-nopmc/lib/5.22.1/x86_64-linux/CORE" -O2 -Wall -Wno-unused-value -Wno-format-security -Winline -ffast-math -DHAVE_JPEG -DJPEG_VERSION=unknown -DHAVE_PNG -DPNG_VERSION=unknown -DHAVE_GIF -DGIF_VERSION=5.1 -DGIFLIB_API_51 -DGIFLIB_API_50 Scale.c In file included from src/image.c:20:0, from Scale.xs:18: src/bmp.c: In function ‘image_bmp_read_header’: src/bmp.c:25:7: warning: variable ‘offset’ set but not used [-Wunused-but-set-variable] int offset, palette_colors; ^ In file included from src/image.c:28:0, from Scale.xs:18: src/gif.c: In function ‘image_gif_load’: src/gif.c:86:7: warning: variable ‘BackGround’ set but not used [-Wunused-but-set-variable] int BackGround = 0; ^ src/gif.c:85:14: warning: variable ‘temp_save’ set but not used [-Wunused-but-set-variable] SavedImage temp_save; ^ Scale.c: In function ‘XS_Image__Scale___cleanup’: Scale.c:709:7: warning: variable ‘self’ set but not used [-Wunused-but-set-variable] HV * self; ^ rm -f blib/arch/auto/Image/Scale/Scale.so LD_RUN_PATH="/usr/lib" cc -shared -fno-stack-protector -O3 -march=native -mtune=native -L/usr/local/lib -fstack-protector-strong Scale.o -o blib/arch/auto/Image/Scale/Scale.so \ -L/usr/local/lib -ljpeg -lpng -lz -lgif \ chmod 755 blib/arch/auto/Image/Scale/Scale.so "/home/kent/perl5/perlbrew/perls/5.22.1-nossp-sdbm-nopmc/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Scale.bs blib/arch/auto/Image/Scale/Scale.bs 644 $ prove -j10 -blr t/ t/01use.t .......... ok t/02pod.t .......... skipped: set TEST_POD to enable this test t/04critic.t ....... skipped: Critic test only for developers. ===( 17;0 0/? 15/30 1/18 0/? 0/? )===========================Cannot open /home/kent/.cpanm/work/1455948722.28578/Image-Scale-0.11/t/tmp/1bit_resize_gd_fixed_point_w127.png at t/bmp.t line 146. # Looks like you planned 30 tests but ran 16. # Looks like your test exited with 2 just after 16. t/bmp.t ............ Dubious, test returned 2 (wstat 512, 0x200) Failed 14/30 subtests t/03podcoverage.t .. skipped: set TEST_POD to enable this test ===( 20;0 3/18 0/? 0/? )=======================================Image::Scale cannot open /home/kent/.cpanm/work/1455948722.28578/Image-Scale-0.11/t/tmp/transparent_resize_gd_fixed_point_w100.png for writing # Looks like you planned 18 tests but ran 6. # Looks like your test exited with 2 just after 6. t/gif.t ............ Dubious, test returned 2 (wstat 512, 0x200) Failed 12/18 subtests ===( 34;0 10/116 1/46 )========================================Cannot open /home/kent/.cpanm/work/1455948722.28578/Image-Scale-0.11/t/tmp/rgba_resize_gd_fixed_point_w100.png at t/png.t line 182. # Looks like you planned 46 tests but ran 20. # Looks like your test exited with 2 just after 20. t/png.t ............ Dubious, test returned 2 (wstat 512, 0x200) Failed 26/46 subtests t/jpeg.t ........... 85/116 # libjpeg version: unknown t/jpeg.t ........... ok Test Summary Report ------------------- t/bmp.t (Wstat: 512 Tests: 16 Failed: 0) Non-zero exit status: 2 Parse errors: Bad plan. You planned 30 tests but ran 16. t/gif.t (Wstat: 512 Tests: 6 Failed: 0) Non-zero exit status: 2 Parse errors: Bad plan. You planned 18 tests but ran 6. t/png.t (Wstat: 512 Tests: 20 Failed: 0) Non-zero exit status: 2 Parse errors: Bad plan. You planned 46 tests but ran 20. Files=8, Tests=159, 0 wallclock secs ( 0.06 usr 0.02 sys + 0.46 cusr 0.11 csys = 0.65 CPU) Result: FAIL kent@katipo2 ~/.cpanm/work/1455948722.28578/Image-Scale-0.11 $