Menu

#432 t/gd_oo_tests.t fails with perl 5.25.12

normal
closed
None
5
2017-06-27
2017-04-21
No

The test suite fails with perl 5.25.12 (various operating systems: freebsd 10, linux debian jessie & stretch, ubuntu 16.04, centos7; both unthreaded and threaded builds):

#   Failed test 'incorrectly initialize an object from an inline hash: non-string key'
# 
#   at t/gd_oo_tests.t line 269.
# 
# Looks like you failed 1 test of 32.
# 
t/gd_oo_tests.t ................. 
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/32 subtests 

I don't see this failure wth perl 5.25.11 or earlier, so it could be a perl regression.

Related

Bugs: #432

Discussion

  • Andreas Koenig

    Andreas Koenig - 2017-04-22

    Could it be a GD/PDL regression? On the smoker without libgd I have no problem with PDL, on the other smoker with libgd I fail this test regardless which perl version.

     
  • Slaven Rezic

    Slaven Rezic - 2017-04-22

    It seems to be a problem with the pure perl implementation of List::MoreUtils.

    Works as expected:

    $ perl5.18.4 -Mblib -MPDL::IO::GD -e 'warn PDL::IO::GD->new(filename=>"/home/eserte/src/bbbike/images/car.gif", [34]=>12)'
    PDL::IO::GD::new couldn't parse its arguments.
    Expected a hash-ref or an inline hash or just a filename
    

    Is causing the test failure:

    $ env LIST_MOREUTILS_PP=1 perl5.18.4 -Mblib -MPDL::IO::GD -e 'warn PDL::IO::GD->new(filename=>"/home/eserte/src/bbbike/images/car.gif", [34]=>12)'
    PDL::IO::GD=HASH(0x801ca9468) at -e line 1.
    

    For some reason the XS implementation of List::MoreUtils does not get build for perl 5.25.12, hence the impression that the test fails only for 5.25.12.

     
  • Slaven Rezic

    Slaven Rezic - 2017-04-22

    Actually it seems to be a problem with the usage of @_ in the test script:

    $ env LIST_MOREUTILS_PP=1 perl5.18.4 -MList::MoreUtils=none -e '@_ = ([34]=>12); warn none { ref $_[2*$_] } 0'     
    1 at -e line 1.
    $ env LIST_MOREUTILS_PP=1 perl5.18.4 -MList::MoreUtils=none -e '@x = ([34]=>12); warn none { ref $x[2*$_] } 0'
    0 at -e line 1.
    
     
    • Petr Písař

      Petr Písař - 2017-04-26

      That never worked with pure-Perl List::MoreUtils. The none is defined as:

      sub none (&@)
      {
          my $f = shift;
          foreach (@_)
          {
              return 0 if $f->();
          }
          return 1;
      }
      

      That means the @_ is changed into empty list when entering $f->() subroutine. It works in the XS implementation because the $$f is called directly on each argument list item.

      I'm not expert on lexical scoping but @_ seems to be a special case in contrast to other named arrays.

       

      Last edit: Petr Písař 2017-04-26
  • Slaven Rezic

    Slaven Rezic - 2017-04-22

    For some reason the XS implementation of List::MoreUtils does not get build for perl 5.25.12, hence the impression that the test fails only for 5.25.12.

    I just realized that List::MoreUtils::XS is a separate distribution which may or may not be installed.

     
  • Chris Marshall

    Chris Marshall - 2017-04-28

    Thanks for the patch and catching the bitrot. I haven't been able to monitor the CPAN Testers status properly due to issues with the database and ones with the web display which, when it has data, often will fail to show any test results even when the summary says otherwise.

     
  • Chris Marshall

    Chris Marshall - 2017-04-29

    The patch has been applied and in the CPAN developers release CHM/PDL-2.017_01.tar.gz which will be released as PDL-2.018 once correct operation is confirmed.

     
  • Chris Marshall

    Chris Marshall - 2017-04-30
    • status: open --> pending-fixed
    • assigned_to: Chris Marshall
     
  •  kmx

    kmx - 2017-05-15

    I would like to see this released, any chance to have PDL-2.018?

     
    • Chris Marshall

      Chris Marshall - 2017-05-15

      It looks like CPAN Testers reports are coming in again and that the latest
      developer release is good. @kmx: is a release this weekend soon enough for
      you (there is one more thing I'm working to finish for 2.018)?

      On Mon, May 15, 2017 at 4:14 AM, kmx kmx1@users.sf.net wrote:

      I would like to see this released, any chance to have PDL-2.018?

      Status: pending-fixed
      Group: normal
      Created: Fri Apr 21, 2017 07:18 AM UTC by Slaven Rezic
      Last Updated: Sun Apr 30, 2017 06:43 PM UTC
      Owner: Chris Marshall

      The test suite fails with perl 5.25.12 (various operating systems: freebsd
      10, linux debian jessie & stretch, ubuntu 16.04, centos7; both unthreaded
      and threaded builds):

      Failed test 'incorrectly initialize an object from an inline hash: non-string key'

      at t/gd_oo_tests.t line 269.

      Looks like you failed 1 test of 32.

      t/gd_oo_tests.t .................
      Dubious, test returned 1 (wstat 256, 0x100)
      Failed 1/32 subtests

      I don't see this failure wth perl 5.25.11 or earlier, so it could be a
      perl regression.


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/pdl/bugs/432/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

      Related

      Bugs: #432

  •  kmx

    kmx - 2017-05-16

    This weekend would be absolutely great, thanks.

     
  • Chris Marshall

    Chris Marshall - 2017-06-27
    • status: pending-fixed --> closed
     

Log in to post a comment.