failing montage.t test

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
Petr
Posts: 51
Joined: 2010-01-07T09:37:51-07:00
Authentication code: 8675309

failing montage.t test

Post by Petr »

I get 19/19 tests failed when make test with 6.8.0-10. More testing shows, that:
6.7.8-8 ok
6.7.9-0 ok
6.7.9-1 fail
6.7.9-3 fail
6.7.9-5 fail
6.8.0-0 fail
6.8.0-10 fail

With following test derived from montage.t:

Code: Select all

use Image::Magick;

my $images=Image::Magick->new;
my $image=Image::Magick->new;

my @colors = ( '#000000', '#008000', '#C0C0C0', '#00FF00',
               '#808080', '#808000', '#FFFFFF', '#FFFF00',
               '#800000', '#000080', '#FF0000', '#0000FF',
               '#800080', '#008080', '#FF00FF', '#00FFFF' );

my $color;
foreach $color ( @colors ) {

  $image->Set(size=>'50x50');
  $status=$image->ReadImage("xc:$color");
  if ("$status") {
    warn "Readimage: $status" if "$status";
  } else {
    push( @$images, @$image);
  }
  undef @$image;
}

my $montageOptions=q/background=>'#696e7e', label=>''/;
eval "\$montage=\$images->Montage( $montageOptions ) ;";

$signature=$montage->GetAttribute('signature');
print "signature: $signature\n";
I get:

Code: Select all

ImageMagick-6.7.8-8/PerlMagick> perl montage-test.pl
signature: fea8915dc67163d86e93a6e611c900185f82bdc5fc67c7a3e53a4b76639aaa56
ImageMagick-6.7.8-8/PerlMagick> grep -A 6 "1) Test montage defaults" t/montage.t
# 1) Test montage defaults (except no label that requires an exact font)
#
testMontage( q//,
  q/background=>'#696e7e', label=>''/,
  '977b812cb06e16d0ee7da6c80a9470cb85c2d33ba33f5919f26b05058f0eb177',
  'fea8915dc67163d86e93a6e611c900185f82bdc5fc67c7a3e53a4b76639aaa56',
  '8de04216e6f60ad3bf63d5a2c54386cb824579e1c4a677af726e0306e0c7fb09');

but

Code: Select all

ImageMagick-6.8.0-10/PerlMagick> perl montage-test.pl
signature: 93afa0ad47528ea284a170f6564e9cbb0b824959daf49ada35c43d9e8ca40f79
ImageMagick-6.8.0-10/PerlMagick> grep -A 6 "1) Test montage defaults" t/montage.t 
# 1) Test montage defaults (except no label that requires an exact font)
#
testMontage( q//,
  q/background=>'#696e7e', label=>''/,
  'a7eaf25ec79757e02a706a3f25022ce5f11ae8ae8e57fa001fd036eea2de8ab9',
  'ea7cddf84b2109684c34896189bfb8b45950fb7ac835a733afae13182c9c368f',
  '1de064bfdd428c871f15f9605e8cb0240b866bf5bc174e80c7fa7cb78d177a2c');
All on the same build system (changeroot).
Could you please advise?
Petr
Posts: 51
Joined: 2010-01-07T09:37:51-07:00
Authentication code: 8675309

Re: failing montage.t test

Post by Petr »

And the issue persists with 6.8.1-0.

Anyway, happy Christmas!
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: failing montage.t test

Post by magick »

The tests pass for us. Do you have Ghostscript installed? Its required for the unit tests to pass. We'll review the tests on a number of our systems and see if we can reproduce the problem. Thanks.
Petr
Posts: 51
Joined: 2010-01-07T09:37:51-07:00
Authentication code: 8675309

Re: failing montage.t test

Post by Petr »

Thanks for quick reply.

Yes, ghostscript is installed. I have tested ImageMagick-6.7.9-1 (first version which is failing for me) with script from initial comment also on live system and I get again

Code: Select all

test> perl montage-test.pl
signature: 93afa0ad47528ea284a170f6564e9cbb0b824959daf49ada35c43d9e8ca40f79
So the signature is different from that expected one in the test.

With ImageMagick-6.7.8-8 I get expected signature on the _same system_.

If there is something wrong in the dependencies, it must be something which doesn't matter in 6.7.9-0 but in 6.7.9-1 does.
Petr
Posts: 51
Joined: 2010-01-07T09:37:51-07:00
Authentication code: 8675309

Re: failing montage.t test

Post by Petr »

Maybe worth to add, that expected signatures in montage.t have changed at the same point of time when this test started failing for me (i. e. between 6.7.9-0 and 6.7.9-1).
Petr
Posts: 51
Joined: 2010-01-07T09:37:51-07:00
Authentication code: 8675309

Re: failing montage.t test

Post by Petr »

This is interesting.

With 6.7.9-1 as well as with 6.8.1-10, except test 12 and 13, I get same 'computed signatures' as expected ones before
http://trac.imagemagick.org/changeset/9087
!

Notes:
* Computed signatures in the tests 12 and 13 differs also between versions 6.7.9-1 and 6.8.1-10.
* This is with quantum-depth=16. With quantum-depth=8, I get same computed signatures as expected ones before changeset 9087 even for test 12 and 13.

To which change is related test changeset in question?
vjt
Posts: 2
Joined: 2013-02-06T05:09:54-07:00
Authentication code: 6789

Re: failing montage.t test

Post by vjt »

Hello,

on an OpenSuSE 11.4 System, while building 6.8.2-4 with GS version "GPL Ghostscript 9.00 (2010-09-14)", I also see the same behaviour reported by Petr: the test passes with the signatures present before changeset 9087.

Cheers,

~Marcello
vjt
Posts: 2
Joined: 2013-02-06T05:09:54-07:00
Authentication code: 6789

Re: failing montage.t test

Post by vjt »

I've released a 6.8.2-4 package for OpenSuSE on the OBS: https://build.opensuse.org/package/show ... vjt%3Aifad. With this, you can programmatically replicate the build environment and analyze what's going on.

Cheers,

~Marcello
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: failing montage.t test

Post by magick »

We can reproduce the problem you posted and have a patch in ImageMagick 6.8.2-6 Beta available by sometime tomorrow. Thanks.
Petr
Posts: 51
Joined: 2010-01-07T09:37:51-07:00
Authentication code: 8675309

Re: failing montage.t test

Post by Petr »

Much better, thanks!

For quantum depth 8 (not tested other so far), I get 2/19 tests failing now:

$images->Set(bordercolor=>'blue', mattecolor=>'red')
$montage=$images->Montage( background=>'#696e7e',, tile=>'4x4', geometry=>'90x80+3+3>', frame=>'8x10',
borderwidth=>'0', gravity=>'Center', background=>'gray' )
ok 11
$images->Set(bordercolor=>'blue', mattecolor=>'red')
$montage=$images->Montage( background=>'#696e7e',, tile=>'4x4', geometry=>'90x80+6+6>', frame=>'8x10',
borderwidth=>'0', gravity=>'Center', shadow=>'True',background=>'gray' )
ReadImage()
Test 12, signatures do not match.
Expected: 61645a8c80a7220a4260133a2b1ae720bf2755f2ed880a3fef0e9453641f5b79
Computed: d4de864f9004b185297c9c2351f811aaeb779095bdd8fd5f29bcfbee79f09da4
Depth: 8
not ok 12
$images->Set(bordercolor=>'blue', mattecolor=>'red')
$montage=$images->Montage( background=>'#696e7e',, tile=>'4x4', geometry=>'90x80+6+6>', frame=>'8x10',
borderwidth=>'0', gravity=>'Center', shadow=>'True', texture=>'granite:' )
ReadImage()
Test 13, signatures do not match.
Expected: 4655b59218afbd58d24a9ecf162a42868b3de40ecc8e9f9671dccf8b17e1aa33
Computed: 8418407b6d56d2c1b67bc735004794d9eb20609d30115a93255eefcad3499e95
Depth: 8
not ok 13

Test 11 passes, so probably shadow or geometry parameters used in test 12 makes the difference. Basically, I get same signatures as in
http://trac.imagemagick.org/browser/Ima ... ?rev=11269
for these two tests.

For quantum depth 16, all 19 tests passed in the same build environment.
Petr
Posts: 51
Joined: 2010-01-07T09:37:51-07:00
Authentication code: 8675309

Re: failing montage.t test

Post by Petr »

By the way, maybe it is off-topic, maybe connected: for write.t, I get two test failing too, again for quantum depth 8:

CompuServe graphics interchange format ...
ReadImage()
Image: GIF:input.gif, signatures do not match.
Expected: 0c2e3c82fd375360fba16258bfa83e35b8c878fd208da9818b50e423426cc437
Computed: 5a25065144213cd0230b7572bd9aef0e447c23a0622193a94ae62c9895c44bf7
Depth: 8
not ok 7
CompuServe graphics interchange format (1987) ...
ReadImage()
Image: GIF87:input.gif87, signatures do not match.
Expected: b68fe02737630f219fbf1f9ef3f24cf2b73c21848443a02df2cc2c0212a65657
Computed: 0138e1e5c9a7ed1604ec5bbe8c22378b84fcd9abb8c36e984b051f9efc14d54e
Depth: 8
not ok 8

So tests related to GIF. And again, I get same signatures as in
http://trac.imagemagick.org/browser/Ima ... /t/write.t

For quantum depth set to 16, I get no test failure.
Petr
Posts: 51
Joined: 2010-01-07T09:37:51-07:00
Authentication code: 8675309

Re: failing montage.t test

Post by Petr »

In pervious two comments, ImageMagick 6.8.4-0 plays the lead role.
Post Reply