Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests fail with Debian testing #255

Open
guimard opened this issue May 2, 2013 · 11 comments
Open

Tests fail with Debian testing #255

guimard opened this issue May 2, 2013 · 11 comments

Comments

@guimard
Copy link

guimard commented May 2, 2013

Hi, using pbuilder (Debian tool), many tests fail reporting something like:

# Failed test at t/Meta/super.t line 77.
# got: 'super() called outside a method at /tmp/buildd/libperl5i-perl-2.11.2/blib/lib/perl5i/2/Meta.pm line 119.
# '
# expected: 'super() called outside a method at t/Meta/super.t line 76.
# '

I've posted a patch that I've to use to disable those tests here : https://rt.cpan.org/Ticket/Display.html?id=84995

@daxim
Copy link
Contributor

daxim commented May 2, 2013

Hello Xavier, the patch is of no use since it just comments out the failing tests - the problem is hidden, but not fixed. Help us gain an understanding why the tests are failing for you, as smoke reports did not show any failure on Linux for 5.11.2 for any stable/released version of Perl so far.

Please add to your problem report how to reproduce the failure. Tell exactly which versions of Debian and pbuilder and any other software that is involved you use, and which steps/how to run the software to arrive at the test output you have pasted. I'm not aware that any of the perl5i maintainers runs Debian, but leastwise I am willing to install it in a virtual machine for debugging and testing purposes.

@guimard
Copy link
Author

guimard commented May 3, 2013

Hi,
it's not a problem of jail, but perhaps a problem with Test::More version. Here is the full log : http://paste.debian.net/1828/
All problems looks like:

  • expected: 'super() called outside a method at t/Meta/super.t line 76
  • got: 'super() called outside a method at /home/xavier/alioth/tmp/libperl5i-perl/blib/lib/perl5i/2/Meta.pm line 119.

@daxim
Copy link
Contributor

daxim commented May 3, 2013

Test::More is not the issue, I've been running 0.98 on my distribution for years without problems. Today I have also installed wheezy-rc2 which comes with Test::More 0.98 and perl5i tests just fine there.

Please don't waste time with unaimed speculation - instead tell how to reproduce the failure you're seeing.

@schwern
Copy link
Contributor

schwern commented May 3, 2013

@daxim Be patient. We're all volunteers here. You've volunteered to help him. @guimard has volunteered to dig into the problem for us. Yeah, it's frustrating to not get all the data to reproduce, not everyone knows what that data we need is. Let's try to make that easier.

@guimard Thanks for the patch, but disabling failing tests is not how we deal with failing tests. Sometimes the test is bogus, but we need to figure that out. This has been a tricky one to reproduce, we've only seen it once before, and we either need to know how to reproduce it or we need you to run code for us.

The problem lies somewhere in perl5i::2::Meta::Instance::$find_method which looks up the stack for the method super was called in. croak is also reporting errors in the wrong place indicating there's something amiss with caller.

So let's try to figure it out. Would you tell us for a start...

  • What version of Debian are you using? I think that's in /etc/debian_version.
  • What version of Perl are you using? Just nopaste your whole perl -V please.
  • What version of the Debian perl-base package you have installed?

I've prepared a special version of the code which has debugging information. Would you also please download and test http://schwern.net/tmp/perl5i-v2.11.2-issue-255.tar.gz and give us the full results of the test? Thank you.

@guimard
Copy link
Author

guimard commented May 3, 2013

Hi, the new build log is available here: http://paste.debian.net/1949/
and bellow my system informations.
Cheers,
Xavier

Debian Release: 7.0
  APT prefers testing
  APT policy: (800, 'testing'), (700, 'stable'), (600, 'unstable'), (200, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.2.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libperl5i-perl depends on:
ii  libautobox-core-perl              1.21-1
ii  libautobox-dump-perl              20090426.1746-1
ii  libautobox-list-util-perl         20090629-1
ii  libautobox-perl                   2.75-1+b1
ii  libautovivification-perl          0.10-1+b1
ii  libc6                             2.13-38
ii  libcapture-tiny-perl              0.18-1
ii  libcarp-fix-1-25-perl             1.000001-1
ii  libchild-perl                     0.009-1
ii  libclass-perl                     1.00-1
ii  libdatetime-format-epoch-perl     0.11-1
ii  libdatetime-perl                  2:1.0300-1
ii  libdatetime-timezone-tzfile-perl  0.002-1
ii  libdevel-declare-perl             0.006011-1
ii  libfile-chdir-perl                0.1006-1
ii  libhash-merge-simple-perl         0.051-1
ii  libhash-storediterator-perl       0.003-1
ii  libindirect-perl                  0.26-1+b1
ii  libipc-system-simple-perl         1.21-1
ii  libjson-perl                      2.53-1
ii  liblist-moreutils-perl            0.33-1+b1
ii  libmodern-perl-perl               1.20120521-1
ii  libobject-id-perl                 0.1.2-1
ii  libperl6-caller-perl              0.100-1
ii  libtaint-util-perl                0.08-1+b2
ii  libtime-y2038-perl                20100403-2+b2
ii  libtrue-perl                      0.18-1+b2
ii  libtry-tiny-perl                  0.11-1
ii  libutf8-all-perl                  0.004-1
ii  libwant-perl                      0.21-1
ii  libyaml-perl                      0.81-1
ii  perl                              5.14.2-21
ii  perl-base                         5.14.2-21

@schwern
Copy link
Contributor

schwern commented May 3, 2013

Thanks for all that info. super() is working, it's a problem in Carp.pm producing the wrong error message. This strongly suggests there's something wrong with the Debian perl.

I see you're using a perl from unstable. Would it be possible to go back to 5.14.2-20 and see if it has the problem?

@guimard
Copy link
Author

guimard commented May 4, 2013

Hi, the problem is the same using perl 5.14.2-20

@guimard
Copy link
Author

guimard commented May 5, 2013

I've perhaps found the problem: using cpan -t perl5i, all works if libtest-wan-perl isn't installed and fail if it is. Wheezy libtest-warn-perl version is 0.23, and upstream is 0.24. Test::Warn Changes file says:

0.24=0.23_01   2012-04-01
0.23_01  2012-02-25
    - compatibility with Carp 1.25 (RURBAN)
    - require Carp 1.22
    - carped.t would better work on Windows

Wheezy Carp lib version is 1.20. So "cpan -t perl5i" compiles Carp when Test::Warn isn't installed. So the solution may be to require Test::Warn >= 0.24 (or just require Carp >= 1.22 but Test::Warn may not work as indicated above)

Note that the previous failed test (http://www.cpantesters.org/cpan/report/ef8fbca6-f99a-11e1-8755-e63c2a028b78) uses 0.23 too

@schwern
Copy link
Contributor

schwern commented May 5, 2013

Good investigation. We're narrowing it down. You're on to something with the Carp version. To make sure I've got it straight, perl5i works with Carp 1.20 and fails with Carp 1.22? Or vice versa?

@schwern
Copy link
Contributor

schwern commented May 5, 2013

@guimard Would you please try changing require Carp::Fix::1_25; in lib/perl5i/2/Meta.pm to require Carp and see if that fixes the problem? I suspect the problem is in that wrapper around Carp.

@guimard
Copy link
Author

guimard commented May 6, 2013

@schwern: same problem with Carp instead of Carp::Fix::1_25.

But using Test::Warn-0.23 with Carp-1.22 or Carp-1.26, all tests succeed. So I think that you just have to require Carp >= 1.22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants