Bug#1069246: dh-make-perl: test failure in t/AptContents.t

gregor herrmann gregoa at debian.org
Thu Apr 18 18:08:29 BST 2024


Source: dh-make-perl
Version: 0.124
Severity: serious
Tags: ftbfs help
Justification: fails to build from source

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

As noticed on ci.debian.net, dh-make-perl has a test failure in
t/AptContents.t:

https://ci.debian.net/packages/d/dh-make-perl/unstable/amd64/45274464/

This also happens locally, and also during the build tests:

t/AptContents.t ..................... 
ok 1 - use Debian::AptContents;
ok 2 - AptContents->new with no cache_dir dies
ok 3 - should say why it died
ok 4 - Distributing files on more CPUs results in no empty slots
ok 5 - should create
ok 6 - contents in a dir
ok 7 - Contents.cache created
ok 8 - cache was used
ok 9 - cache updated
ok 10 - Moose found by find_file_packages
ok 11 - Moose found by module name
ok 12 - get_contents_files
ok 13 - GD.pm is in libdg-gd2[-noxpm]-perl
ok 14 - Alternative dependency for module found in multiple packages
ok 15 - Image/Magick.pm in perlmagick and graphicsmagick-libmagick-dev-compat, but different paths
ok 16 - Alternative dependency for Image::Magick module found in multiple packages
ok 17 - Test::More is in perl core and libtest-simple-perl but we only get the latter
ok 18 - use Debian::Control::FromCPAN;
ok 19 - Test::More is in libtest-simple-perl
ok 20
1..20
Failed 1/20 subtests 

Test Summary Report
- -------------------
t/AptContents.t                   (Wstat: 0 Tests: 19 Failed: 0)
  Parse errors: Tests out of sequence.  Found (20) but expected (19)
                Bad plan.  You planned 20 tests but ran 19.
Files=24, Tests=409, 20 wallclock secs ( 0.07 usr  0.04 sys + 15.74 cusr  2.40 csys = 18.25 CPU)
Result: FAIL


And I don't understand the issue … Looking at the code:

   112	is( ( $ctl->find_debs_for_modules( { 'Test::More' => '0' }, $apt_contents ) )[0] . '',
   113	    'libtest-simple-perl',
   114	    'Test::More is in libtest-simple-perl'
   115	);
   116	
   117	ok( unlink "$Bin/Contents.cache", 'Contents.cache unlinked' );
   118	

Line 112 is test 19, succeeding and outputting "Test::More is in
libtest-simple-perl".

Test 20 is the unlink in line 117; no output (but the file is
removed).

Changing line 117 to

is( unlink( "$Bin/Contents.cache" ), 1, '20 Contents.cache unlinked' );

leads to basically the same:

ok 20 - Contents.cache unlnked
1..20
Failed 1/20 subtests 

Test Summary Report
- -------------------
t/AptContents.t (Wstat: 0 Tests: 19 Failed: 0)
  Parse errors: Tests out of sequence.  Found (20) but expected (19)
                Bad plan.  You planned 20 tests but ran 19.

Now the test name/message is printed, but still there's this "Tests
out of sequence" error message.


No idea if this is a problem in dh-make-perl (I think not, we see
something very similar in libconfig-model-dpkg-perl), or in
Test::More or somewhere else …


Cheers,
gregor


-----BEGIN PGP SIGNATURE-----

iQKTBAEBCgB9FiEE0eExbpOnYKgQTYX6uzpoAYZJqgYFAmYhU41fFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEQx
RTEzMTZFOTNBNzYwQTgxMDREODVGQUJCM0E2ODAxODY0OUFBMDYACgkQuzpoAYZJ
qgZrqQ/9Gnom3gRNYvgPGBmba3r1O1xP+8ODIKxlsMgdSsRUsBV+XVZNSPSZcMdC
iH4RqZf5kYvt0rpHXzIgz88lxky3ERLnoKrlmaI2A0gS4D6VtrjIdHdn6lRjmobR
PAU0K4BI5GDEFugZZnDxLKOlF2ClcGtqYVz91qDhLWoVjjzZQGvC3Er1tqTk4Ze9
uztJd3gg8J9f3wjcMYZCQwUZcALz6flnK7Eef4IMs0PRV45SRSMTQ6wS7Kp31amL
KQDqzPrQqbXJ2u6u4Ax04MeJrDW9y/p1Tw9Xt/2yYa1VXtyLPS+PcBWA3jEmjaXK
SgTeuvSf1cMk4PS75AT+Y3oZxYLDuP4QvdgjZCPG4Zxi3W1pt6bOV011t6kB0Oiz
aP8S/c4HbfNwhVjgrJRhBOizs2GioALV1/iA7LC0OFyVZbe3OWj/4x3i86FzgVqB
MzVcABTRCnKBHFUhZGMtPMXzm8l8COZkHgFkos43Z09nAZwcB5n8MLPPW4F3X1wd
HFoMQd1JcyAjWlwMohoyPRtM+qKbLdhDJc3NJoE7QG4WxQT5zT8TJXkEniLQplsJ
tCezQyDN7XSuJbILdIZTXG4T32m1MhOCq4GnR9d1pGMar9evM0UsRScrEKMs9ANa
8lY1WMbr3q61RyzNGOT7HmIp37fpEPOBc3OBw4uGhmvCYfF9GyY=
=+yiH
-----END PGP SIGNATURE-----


More information about the pkg-perl-maintainers mailing list