• Bug#1069247: libconfig-model-dpkg-perl: test failures

    From gregor herrmann@21:1/5 to Dominique Dumont on Sat Apr 20 17:40:01 2024
    On Sat, 20 Apr 2024 11:09:17 +0200, Dominique Dumont wrote:

    This really looks like a bug with prove:

    $ perl t/reorder.t
    ok 1 - test re-ordered list
    1..1
    $ prove -l -v -p t/reorder.t
    t/reorder.t ..
    ok 1 - test re-ordered list
    1..1
    Failed 1/1 subtests

    Test Summary Report
    -------------------
    t/reorder.t (Wstat: 0 Tests: 0 Failed: 0)
    Parse errors: Bad plan. You planned 1 tests but ran 0.
    Files=1, Tests=0, 1 wallclock secs ( 0.02 usr 0.00 sys + 0.92 cusr 0.07 csys = 1.01 CPU)
    Result: FAIL

    Good idea to run this directly with `perl'.

    I can't see what's wrong with the output of reorder test...

    Ack, and same for the failing test in dh-make-perl (#1069246).

    But I don't see that `prove' has changed recently … So maybe this is
    in fact even somewhere "deeper"?

    I'll try to dig this later on..

    Thanks!


    Cheers,
    gregor

    --
    .''`. https://info.comodo.priv.at -- Debian Developer https://www.debian.org
    : :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D 85FA BB3A 6801 8649 AA06
    `. `' Member VIBE!AT & SPI Inc. -- Supporter Free Software Foundation Europe
    `-

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

    iQKTBAEBCgB9FiEE0eExbpOnYKgQTYX6uzpoAYZJqgYFAmYj3zhfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEQx RTEzMTZFOTNBNzYwQTgxMDREODVGQUJCM0E2ODAxODY0OUFBMDYACgkQuzpoAYZJ qgYKNw//dduNcfO0t1KW+dqqZHYpuQ0o+QTLg2CXU78WH30nHqi4ps8knC5QN7TT yaQESIUZMSzJee+oi4RW3PB9q9qr+VU5KG+URn37l0ybQNJWZl88tBzzdyfqwtao T7+63QTaWSBhtAXM1yORkMp2kn07PzVmMVnPvPXL7YRlVuVO2eDNlJWzahbnxP31 4hTaQ1d0XZnCKvQjWM9hAD0XIExoNGfS/7u3CJPHhALaMuLZNK0j/5wpPPYcwMXd yyScsdJZf0bNloEteEYVuEIb7gArEERaweNT+RE0+y7dv1SxsVbTrQfIyz8JHzOZ cqqqUFPLRkPoqVUg6FLoisc6U2KqSC/BfcmPjU5WdpYyNYNmz8KIxLD2XGzuMQsk 64SEdev3qFDBuNS+ftfw6hNWniwGrcVAC6LdssyncsM9Q6opYDQSGo9MvjZ1Wjh5 YiOS58j8kx1sB/4U2246ESrUVhvUHYHoXXm4Q9OTe4Si4nu54UucSwwgZkgHb/5L
    4LymfzTe
  • From Niko Tyni@21:1/5 to Dominique Dumont on Sat Apr 20 20:10:01 2024
    On Sat, Apr 20, 2024 at 11:09:17AM +0200, Dominique Dumont wrote:
    On Thursday, 18 April 2024 19:21:55 CEST you wrote:
    Source: libconfig-model-dpkg-perl
    Version: 3.004
    Severity: serious
    Tags: ftbfs
    Justification: fails to build from source

    This really looks like a bug with prove:

    $ perl t/reorder.t
    ok 1 - test re-ordered list
    1..1

    I can't see what's wrong with the output of reorder test...

    Looks like something is injecting apt progress messages to stdout with
    CR characters hiding it on the terminal but obviously not from `prove`.

    $ perl t/reorder.t |od -c
    0000000 \r R e a d i n g p a c k a g e
    0000020 l i s t s . . . 0 % \r \r R e
    0000040 a d i n g p a c k a g e l i
    0000060 s t s . . . 1 0 0 % \r
    0000100
    0000120 \r \r B u i l
    0000140 d i n g d e p e n d e n c y
    0000160 t r e e . . . 0 % \r \r B u i l
    0000200 d i n g d e p e n d e n c y
    0000220 t r e e . . . 0 % \r \r B u i l
    0000240 d i n g d e p e n d e n c y
    0000260 t r e e . . . 5 0 % \r \r B u i
    0000300 l d i n g d e p e n d e n c y
    0000320 t r e e . . . 5 0 % \r
    0000340
    0000360 \r \r R
    0000400 e a d i n g s t a t e i n f
    0000420 o r m a t i o n . . . 0 % \r \r
    0000440 R e a d i n g s t a t e i n
    0000460 f o r m a t i o n . . . 0 % \r
    0000500
    *
    0000540 \r o k 1 - t e s t r e
    0000560 - o r d e r e d l i s t \n 1 .
    0000600 . 1 \n
    0000603

    HTH,
    --
    Niko

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Julian Andres Klode@21:1/5 to Niko Tyni on Sun Apr 21 18:10:01 2024
    On Sun, Apr 21, 2024 at 04:32:48PM +0300, Niko Tyni wrote:
    [Copying Julian as the apt maintainer.]

    On Sat, Apr 20, 2024 at 09:02:35PM +0300, Niko Tyni wrote:
    On Sat, Apr 20, 2024 at 11:09:17AM +0200, Dominique Dumont wrote:
    On Thursday, 18 April 2024 19:21:55 CEST you wrote:
    Source: libconfig-model-dpkg-perl
    Version: 3.004
    Severity: serious
    Tags: ftbfs
    Justification: fails to build from source

    This really looks like a bug with prove:

    $ perl t/reorder.t
    ok 1 - test re-ordered list
    1..1

    I can't see what's wrong with the output of reorder test...

    Looks like something is injecting apt progress messages to stdout with
    CR characters hiding it on the terminal but obviously not from `prove`.

    $ perl t/reorder.t |od -c

    0000460 f o r m a t i o n . . . 0 % \r 0000500
    *
    0000540 \r o k 1 - t e s t r e 0000560 - o r d e r e d l i s t \n 1 . 0000600 . 1 \n

    These come from apt, via libapt-pkg-perl which I don't think has ever filtered them away. The thing that broke this is surely output changes
    in apt 2.9.

    The crucial difference wrt. at least bookworm seems to be that the
    apt messages used to end with a line feed "\n" before the actual TAP
    format started. Now it only has a carriage return "\r" there. Apparently `prove` ignores unknown lines, but now interprets all the apt output to
    be part of the first line that ends with the 'ok 1' part. So that gets ignored as well.

    I see the TAP format spec says at

    https://testanything.org/tap-version-14-specification.html

    A Harness should normalize line endings by replacing any instances of
    \r\n or \r in the TAP document with \n.

    so I suppose this might be a normal/wishlist bug in `prove`. In that case, please note that it needs to be fixed in libtest-harness-perl first as src:perl just bundles an older version of it.

    Not sure if apt should go back to ending its output with a line
    feed. Julian, what do you think?
    --
    Niko

    This should be fixed in apt git already, just needs an upload,
    which is waiting-ish for some more merges
    --
    debian developer - deb.li/jak | jak-linux.org - free software dev
    ubuntu core developer i speak de, en

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)