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

t/when.t: possible failure to locate loadable object #6

Open
jkeenan opened this issue Jan 22, 2020 · 2 comments
Open

t/when.t: possible failure to locate loadable object #6

jkeenan opened this issue Jan 22, 2020 · 2 comments

Comments

@jkeenan
Copy link

jkeenan commented Jan 22, 2020

This issue may be related to #3.

In the course of testing the CPAN-River-3000 against perl-5.31.8 yesterday, I observed a test failure in t/when.t which I had not encountered in previous months in the current perl development cycle.

#   Failed test at t/when.t line 26.
#          got: '6'
#     expected: '4'
# Looks like you failed 1 test of 8.
t/when.t ..
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/8 subtests

Test Summary Report
-------------------
t/when.t (Wstat: 256 Tests: 8 Failed: 1)
  Failed test:  5

When I went to the directory in which cpanm had unpacked this distro and ran make test, I was able to reproduce the failure. However, when I ran prove -vb t/when.t. The test PASSed.

I next attempted to run the test file against perl-5.31.8 using the debugger. I got a "failed to locate loadable object" error:

  DB<4>
Time::Warp::(blib/lib/Time/Warp.pm:10):
10: __PACKAGE__->bootstrap($VERSION);
  DB<4>
Can't locate loadable object for module Time::Warp in @INC (@INC contains: /home/jkeenan/var/tad/testing/perl-5.31.8/lib/5.31.8/amd64-freebsd-thread-multi /home/jkeenan/var/tad/testing/perl-5.31.8/lib/5.31.8 /home/jkeenan/var/tad/testing/perl-5.31.8/lib blib/lib /home/jkeenan/var/tad/testing/perl-5.31.8/lib/site_perl/5.31.8/amd64-freebsd-thread-multi /home/jkeenan/var/tad/testing/perl-5.31.8/lib/site_perl/5.31.8 /home/jkeenan/var/tad/testing/perl-5.31.8/lib/5.31.8/amd64-freebsd-thread-multi /home/jkeenan/var/tad/testing/perl-5.31.8/lib/5.31.8) at t/when.t line 16.
 at /home/jkeenan/var/tad/testing/perl-5.31.8/lib/5.31.8/amd64-freebsd-thread-multi/DynaLoader.pm line 95.
    DynaLoader::croak("Can't locate loadable object for module Time::Warp in \@INC (\@"...) called at /home/jkeenan/var/tad/testing/perl-5.31.8/lib/5.31.8/amd64-freebsd-thread-multi/DynaLoader.pm line 159
    DynaLoader::bootstrap("Time::Warp", 0.54) called at blib/lib/Time/Warp.pm line 10
    require Time/Warp.pm called at t/when.t line 16
Compilation failed in require at t/when.t line 16.
 at t/when.t line 16.

Can you investigate?

Thank you very much.
Jim Keenan

@hvds
Copy link

hvds commented Jan 22, 2020

This looks very likely to be explained by the comment at the top of the test file:
# These tests may occationally fail due to small timing differences.

At this point time is at x2 scale, so it needs only for the real time() to see $now + 3 instead of $now + 2 after the sleep(2) to give the result you saw. That's perfectly to be expected as an intermittent result, especially on a slow/loaded machine or a vm.

@eserte
Copy link

eserte commented Jan 23, 2020

Already reported some years ago on RT: https://rt.cpan.org/Ticket/Display.html?id=95069

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