Bug#1008939: use.t: allow empty lines in debian/tests/pkg-perl/use-name? (also use-whitelist)

gregor herrmann gregoa at debian.org
Mon Apr 4 19:07:37 BST 2022


Package: pkg-perl-autopkgtest
Version: 0.66
Severity: important
Tags: patch
X-Debbugs-Cc: ntyni at debian.org

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

This is a kind of followup for #1008267:

While updating libchart-perl, I came across the following failure of
use.t:

  /usr/share/pkg-perl-autopkgtest/runtime-deps.d/use.t .. 
  1..8
  ok 1 -  /usr/bin/perl -w -M"Chart::Base" -e 1 2>&1 exited successfully
  ok 2 -  /usr/bin/perl -w -M"Chart::Base" -e 1 2>&1 produced no (non-whitelisted) output
  ok 3 - env PERL_DL_NONLAZY=1  /usr/bin/perl -w -M"Chart::Base" -e 1 2>&1 exited successfully
  ok 4 - env PERL_DL_NONLAZY=1  /usr/bin/perl -w -M"Chart::Base" -e 1 2>&1 produced no (non-whitelisted) output
  # Missing argument to -M.
  not ok 5 -  /usr/bin/perl -w -M"" -e 1 2>&1 exited successfully
  not ok 6 -  /usr/bin/perl -w -M"" -e 1 2>&1 produced no (non-whitelisted) output
  # Missing argument to -M.
  not ok 7 - env PERL_DL_NONLAZY=1  /usr/bin/perl -w -M"" -e 1 2>&1 exited successfully
  not ok 8 - env PERL_DL_NONLAZY=1  /usr/bin/perl -w -M"" -e 1 2>&1 produced no (non-whitelisted) output
  Dubious, test returned 4 (wstat 1024, 0x400)
  Failed 4/8 subtests 

So first (1-4) we have -M"Chart::Base", then (5-8) we see -M"". Where
does this come from? From debian/tests/pkg-perl/use-name which
starts with

  % cat debian/tests/pkg-perl/use-name
  # Chart.pm is only documentation. Let's check Chart::Base.
  Chart::Base

  # other options
  # Chart::Bars
  # Chart::Composite
  …


So @modules in use.t contains "Chart::Base" and "". Not ideal :)
This only appeared following the change in 0.66/#1008267 to allow
multiple module names (and multiple warnings), before that everything
was "fine" as only the first non-comment line was taken.

For now I've removed the empty line in libchart-perl's
debian/tests/pkg-perl/use-name but as this has potential for breaking
other packages' autopkgtests and is also counter-intuitive, I suggest
we accept and ignore empty lines in debian/tests/pkg-perl/use-name
(and also debian/tests/pkg-perl/use-whitelist).

Proposed patch:

#v+
- --- /usr/share/pkg-perl-autopkgtest/runtime-deps.d/use.t.packaged       2022-04-04 17:48:42.204873999 +0000
+++ /usr/share/pkg-perl-autopkgtest/runtime-deps.d/use.t        2022-04-04 17:51:26.125604484 +0000
@@ -39,7 +39,7 @@
             or BAIL_OUT("$conffile exists but can't be read");
         while (<M>) {
             chomp;
- -            next if /^\s*#/;
+            next if /^\s*(#|$)/;
             push @ret, $_;
         }
         close M;
#v-


Cheers,
gregor

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

iQKTBAEBCgB9FiEE0eExbpOnYKgQTYX6uzpoAYZJqgYFAmJLM+lfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEQx
RTEzMTZFOTNBNzYwQTgxMDREODVGQUJCM0E2ODAxODY0OUFBMDYACgkQuzpoAYZJ
qgYClQ//UrXonlEPwrfU8PD67ikxxUmw7/922MxJ5NOOWuQCPTWgBIJmsemcTArd
8OawqK+hmQM6qbd+8Eml2ALEZjtwW7xj/KvTScJpk/8x8RRb43ebxXOShLjy8Ah6
JeBI3624BLcivvplLdojJWHknTJiDKFiZqIiRq+Mcno7speFubN5d2VEA9JLnY5F
crxCIGpHZLNu+5ucAXBVGK6shz9a2ySs/5h8G4Qf6cuFbMYM72Zr6CNw4v35aV94
zACcsegrRb3YF9duCszOScwt/nGdoZPlTmYrCjpO2xtEuQruXSBP+V3uRxsCUMaJ
qMtCleJfTjMUwvxCxp4VbovFz/d41m0dDBLYmoR/opGiiq3DQeS+yg+07NS4NNkg
L/3di9cESvZtW3PELes6Yk6WRKAk0dfGxEB/ybTI1qKq3OHzPpgcQ50ELYjuNeQ2
bVzDdaagBT4ko04CFQ0Jrcx+xOK/kFLYQm1yrRmuMx1Raeo/c40iIhthrZpRMB4X
Qgspk4BJbgsIxIis+SCPVViH7v4gFm5utqmxK7ZX4YNd38c8NFBvzBeJB+4teywh
HMn8JP7rlODnREW9s7nHPGXMGIoLG+fVxnNcgFYyjwgawdbZLjcSNI0PMxYgCZO4
qp0xqDNVIHVaQ3DQwkzmZXEU0oJmxMtpSHuJMYPjz817/xIhw6M=
=CKrQ
-----END PGP SIGNATURE-----


More information about the pkg-perl-maintainers mailing list