Perl / perl5

🐪 The Perl programming language
https://dev.perl.org/perl5/
Other
1.98k stars 560 forks source link

BBC: c844eac triggers failures in Devel::Cover #22439

Open jkeenan opened 3 months ago

jkeenan commented 3 months ago

Commit c844eac5926d1efbdfbf2e8bcc3989ba6a6aee50 has triggered CPANtesters failures for the Devel-Cover distribution.

Sample failure report

Extract:

#   Failed test 'output'
#   at blib/lib/Devel/Cover/Test.pm line 304.
# +----+------------------------------------------------------------+-------------------------------------------------------------+
# | Elt|Got                                                         |Expected                                                     |
# +----+------------------------------------------------------------+-------------------------------------------------------------+
# * 117|  '19           100      3      6      1      2   $y ^^ $z  |  '19           100      3      6      1      2   $y xor $z  *
# +----+------------------------------------------------------------+-------------------------------------------------------------+
# * 119|  '21    ***     50      9      3      0      0   $i ^^ $y  |  '21    ***     50      9      3      0      0   $i xor $y  *
# +----+------------------------------------------------------------+-------------------------------------------------------------+
# * 121|  '22    ***     50      0      0      9      3   $j ^^ $y  |  '22    ***     50      0      0      9      3   $j xor $y  *
# +----+------------------------------------------------------------+-------------------------------------------------------------+
# Looks like you failed 1 test of 1.
t/e2e/acond_xor.t .................. 
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/1 subtests 

Not surprisingly, bisection pointed to this commit:

commit c844eac5926d1efbdfbf2e8bcc3989ba6a6aee50
Author:     Lukas Mai <l.mai@web.de>
AuthorDate: Fri May 24 00:34:53 2024
Commit:     Lukas Mai <l.mai@web.de>
CommitDate: Wed Jul 10 23:44:57 2024

    B::Deparse: teach Deparse about ^^ (high-precedence xor)

@mauke, can you investigate and/or discuss with @pjcj? Thanks.

pjcj commented 3 months ago

Thanks Jim! I thought I had already created a Devel::Cover ticket for this but it looks like I only thought I should rather than actually doing it :)

My initial suspicion was that this would be a Devel::Cover problem due to not having the complete context when deparsing a section of the optree. I'll look further into it to make sure it's not a perl problem, but I'd be quite surprised if it was.

And I'll make sure Devel::Cover is fixed before 5.42.