Skip Menu |

This queue is for tickets about the Event-Lib CPAN distribution.

Report information
The Basics
Id: 67230
Status: open
Priority: 0/
Queue: Event-Lib

People
Owner: Nobody in particular
Requestors: i.kay [...] me.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Bug in Event-Lib Tests. Deb Squeeze. GCC 4.4.3. LibEvent 2.0.10.
Date: Mon, 04 Apr 2011 20:06:41 +0100
To: bug-Event-Lib [...] rt.cpan.org
From: Iain Kay <i.kay [...] me.com>
Hi, I am trying to install Event::Lib on my Debian Squeeze x86_64 server. At first I attempted to use aptitude to install libevent-dev and libevent-perl. This did not work, no Event::Lib module installed. I proceeded to remove libevent-perl and attempt to use cpan to install Event::Lib. I then removed libevent-dev from aptitude and compiled libevent 2.0.10 from source. I then went back to cpan and still could not install. So I downloaded the Lib-Event-1.03.tar.gz from cpan website and untarred. Perl Makefile.PL runs all ok and generates file to make. I type make and everything runs ok. When running make test I receive the following error, this is the same error as I have observed in cpan every time: # Quote # Test Summary Report ------------------- t/20_signal.t (Wstat: 0 Tests: 3 Failed: 0) Parse errors: Tests out of sequence. Found (2) but expected (3) t/51_cleanup_persistent.t (Wstat: 0 Tests: 6 Failed: 0) Parse errors: Tests out of sequence. Found (1) but expected (2) Tests out of sequence. Found (2) but expected (3) Tests out of sequence. Found (2) but expected (4) Tests out of sequence. Found (2) but expected (5) Tests out of sequence. Found (3) but expected (6) Files=36, Tests=282, 47 wallclock secs ( 0.14 usr 0.04 sys + 0.60 cusr 0.13 csys = 0.91 CPU) Result: FAIL Failed 2/36 test programs. 0/282 subtests failed. make: *** [test_dynamic] Error 255 # End Quote # Having received this error in make test, I decided to run make install anyway. Event::Lib is copied to place and does work in a simple test script I have. So I guess my questions would be is this a bug? do these test failures even matter? and can I be of help by providing further information? Regards Iain Kay
Hi, same problem here on SLES 11 SP3 custom perl 5.16.3 libevent-devel-1.4.5-24.21 For fixing the Problem I added a patch, comments welcome Have Fun M0ses
Subject: patch_tests_out_of_sequence.diff
commit 397492975de73432cf150ef314d80248aa88dd64 Author: M0ses <fs@isarnet.de> Date: Wed Oct 2 18:25:56 2013 +0200 [BUGFIX] RT #67230 "Tests out of sequence." * Test.pm seems not to be "fork-save" * Problem occured with perl 5.16 * fix uses Test::SharedFork to guarantee proper sequence numbers diff --git a/t/20_signal.t b/t/20_signal.t index a82b19f..4b01dfd 100644 --- a/t/20_signal.t +++ b/t/20_signal.t @@ -1,6 +1,6 @@ -use Test; +use Test::More; BEGIN { plan tests => 3 } - +use Test::SharedFork; use Event::Lib; use Devel::Peek; diff --git a/t/51_cleanup_persistent.t b/t/51_cleanup_persistent.t index 4394acc..9022e6b 100644 --- a/t/51_cleanup_persistent.t +++ b/t/51_cleanup_persistent.t @@ -19,7 +19,8 @@ $^W = 0; use Event::Lib; use POSIX qw/SIGHUP/; -use Test; +use Test::More; +use Test::SharedFork; BEGIN { plan tests => 6; } my $pid = fork; @@ -37,9 +38,9 @@ if ($pid) { } else { event_init; MyEvent->new(SIGHUP, sub {})->add; - ok($_DESTROY, "not called"); + is($_DESTROY, "not called"); event_one_loop; - ok($_DESTROY, "not called", "Event::Lib::signal::DESTROY erroneously called"); + is($_DESTROY, "not called", "Event::Lib::signal::DESTROY erroneously called"); exit; } @@ -57,8 +58,8 @@ if ($pid) { } else { event_init; MyEvent->new(SIGHUP, sub {shift->remove})->add; - ok($_DESTROY, "not called"); + is($_DESTROY, "not called"); event_one_loop; - ok($_DESTROY, "called", "Event::Lib::signal::DESTROY called too late"); + is($_DESTROY, "called", "Event::Lib::signal::DESTROY called too late"); exit; }