Subject: | Net-Curl-Simple test failure if EV::Coro does not load but both EV and Coro do |
This is a bit embarassing and might not count as a bug, but I guess it's
still worth a report. The test t/40-coro-any.t in the
Net-Curl-Simple-0.10 distribution gives some failures if the Coro::EV
module does not load but both Coro and EV does load.
I've got this situation by upgrading the EV module to a later version
(from 3.* to 4.*) but not reinstalling Coro, so loading Coro::EV died
with an error message saying that the binary compatibility of EV has
changed so I must reinstall Coro. I have since reinstalled Coro so I
can't exactly reproduce the original situation, but I can get the test
failure by adding a failing dummy Coro::EV module to perl's INC, as
shown below.
This is an amd64-linux machine with libcurl 7.21 installed from the
debian lenny package, a vanilla perl 5.12.3, Net-Curl version 0.21, and
Net-Curl-Simple version 0.10.
With Coro::EV fixed, no tests of Net-Curl and Net-Curl-Simple fail.
With the dummy failing Coro::EV enabled, no tests of Net-Curl-Simple
other than t/40-coro-any.t fail.
Thanks,
Ambrus
[am]king ~/build/perl/Net-Curl-Simple-0.10$ find x1
x1
x1/Coro
x1/Coro/EV.pm
[am]king ~/build/perl/Net-Curl-Simple-0.10$ cat x1/Coro/EV.pm
# dummy fail Coro::EV
package Coro::EV;
die "cannot load Coro::EV for pretense";
0;
[am]king ~/build/perl/Net-Curl-Simple-0.10$ prove -I./x1 t/40-coro-any.t
t/40-coro-any.t .. 1/20 Please rebuild libcurl with AsynchDNS to avoid
blocking DNS requests
# Failed test 'first returned after second start'
# at t/40-coro-any.t line 21.
# got: '2'
# expected: '3'
# Failed test 'did not block'
# at t/40-coro-any.t line 34.
# got: '3'
# expected: '2'
# loaded implementation: Net/Curl/Simple/Async/CoroEV.pm,
Net/Curl/Simple/Async/EV.pm
# Looks like you failed 2 tests of 20.
t/40-coro-any.t .. Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/20 subtests
Test Summary Report
-------------------
t/40-coro-any.t (Wstat: 512 Tests: 20 Failed: 2)
Failed tests: 2, 11
Non-zero exit status: 2
Files=1, Tests=20, 0 wallclock secs ( 0.03 usr 0.00 sys + 0.05 cusr
0.00 csys = 0.08 CPU)
Result: FAIL
1[am]king ~/build/perl/Net-Curl-Simple-0.10$ prove t/40-coro-any.t
t/40-coro-any.t .. 1/20 Please rebuild libcurl with AsynchDNS to avoid
blocking DNS requests
t/40-coro-any.t .. 3/20 # loaded implementation:
Net/Curl/Simple/Async/CoroEV.pm
t/40-coro-any.t .. ok
All tests successful.
Files=1, Tests=20, 1 wallclock secs ( 0.01 usr 0.01 sys + 0.04 cusr
0.01 csys = 0.07 CPU)
Result: PASS
[am]king ~/build/perl/Net-Curl-Simple-0.10$ perl -wE 'use Net::Curl; use
Data::Dumper; print Dumper(Net::Curl::version_info(), $Net::Curl::VERSION);'
$VAR1 = {
'features' => 1597,
'version_num' => 464128,
'version' => '7.21.0',
'libidn' => '1.15',
'age' => 3,
'libssh_version' => 'libssh2/1.2.5',
'host' => 'x86_64-pc-linux-gnu',
'ssl_version_num' => 0,
'iconv_ver_num' => 0,
'protocols' => [
'dict',
'file',
'ftp',
'ftps',
'http',
'https',
'imap',
'imaps',
'ldap',
'ldaps',
'pop3',
'pop3s',
'rtsp',
'scp',
'sftp',
'smtp',
'smtps',
'telnet',
'tftp'
],
'libz_version' => '1.2.3.4',
'ares_num' => 0,
'ssl_version' => 'OpenSSL/0.9.8o'
};
$VAR2 = '0.21';
[am]king ~/build/perl/Net-Curl-Simple-0.10$ perl -V
Summary of my perl5 (revision 5 version 12 subversion 3) configuration:
Platform:
osname=linux, osvers=2.6.34.1, archname=x86_64-linux
uname='linux king 2.6.34.1 #1 smp sat jul 10 18:21:56 cest 2010
x86_64 gnulinux '
config_args='-Dinc_version_list=5.12.2/x86_64-linux 5.12.2
5.12.1/x86_64-linux 5.12.1 5.12.0/x86_64-linux 5.12.0 -d'
hint=recommended, useposix=true, d_sigaction=define
useithreads=undef, usemultiplicity=undef
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=define, use64bitall=define, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-fno-strict-aliasing -pipe -fstack-protector
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O2',
cppflags='-fno-strict-aliasing -pipe -fstack-protector
-I/usr/local/include'
ccversion='', gccversion='4.5.1', gccosandvers=''
intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -fstack-protector -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib /lib64 /usr/lib64 /usr/local/lib64
libs=-lnsl -ldl -lm -lcrypt -lutil -lc
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
libc=/lib/libc-2.7.so, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version='2.7'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib
-fstack-protector'
Characteristics of this binary (from libperl):
Compile-time options: PERL_DONT_CREATE_GVSV PERL_MALLOC_WRAP
USE_64_BIT_ALL
USE_64_BIT_INT USE_LARGE_FILES USE_PERLIO
USE_PERL_ATOF
Built under linux
Compiled at Jan 25 2011 14:36:36
@INC:
/usr/local/lib/perl5/site_perl/5.12.3/x86_64-linux
/usr/local/lib/perl5/site_perl/5.12.3
/usr/local/lib/perl5/5.12.3/x86_64-linux
/usr/local/lib/perl5/5.12.3
/usr/local/lib/perl5/site_perl/5.12.2/x86_64-linux
/usr/local/lib/perl5/site_perl/5.12.2
/usr/local/lib/perl5/site_perl/5.12.1/x86_64-linux
/usr/local/lib/perl5/site_perl/5.12.1
/usr/local/lib/perl5/site_perl/5.12.0/x86_64-linux
/usr/local/lib/perl5/site_perl/5.12.0
/usr/local/lib/perl5/site_perl
.
[am]king ~/build/perl/Net-Curl-Simple-0.10$ perl -wE 'use Coro; say
$Coro::VERSION;'
5.372
[am]king ~/build/perl/Net-Curl-Simple-0.10$ perl -wE 'use EV; say
$EV::VERSION;'
4.01
[am]king ~/build/perl/Net-Curl-Simple-0.10$ [am]king
~/build/perl/Net-Curl-Simple-0.10$ prove -I./x1
t/01-use.t ............... ok
t/02-version.t ........... ok
t/10-simple.t ............ Please rebuild libcurl with AsynchDNS to
avoid blocking DNS requests
t/10-simple.t ............ ok
t/20-async-perl.t ........ Please rebuild libcurl with AsynchDNS to
avoid blocking DNS requests
t/20-async-perl.t ........ ok
t/21-async-anyevent.t .... Please rebuild libcurl with AsynchDNS to
avoid blocking DNS requests
t/21-async-anyevent.t .... ok
t/22-async-poe.t ......... skipped: POE is required for this test
t/23-async-ev.t .......... Please rebuild libcurl with AsynchDNS to
avoid blocking DNS requests
t/23-async-ev.t .......... ok
t/24-async-any.t ......... Please rebuild libcurl with AsynchDNS to
avoid blocking DNS requests
t/24-async-any.t ......... 2/18 # loaded implementation:
Net/Curl/Simple/Async/EV.pm
t/24-async-any.t ......... ok
t/30-useragent-simple.t .. Please rebuild libcurl with AsynchDNS to
avoid blocking DNS requests
t/30-useragent-simple.t .. ok
t/40-coro-any.t .......... 1/20 Please rebuild libcurl with AsynchDNS to
avoid blocking DNS requests
# Failed test 'first returned after second start'
# at t/40-coro-any.t line 21.
# got: '2'
# expected: '3'
# Failed test 'did not block'
# at t/40-coro-any.t line 34.
# got: '3'
# expected: '2'
# loaded implementation: Net/Curl/Simple/Async/CoroEV.pm,
Net/Curl/Simple/Async/EV.pm
# Looks like you failed 2 tests of 20.
t/40-coro-any.t .......... Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/20 subtests
t/41-coro-ev.t ........... skipped: Coro is required for this test
t/42-coro-anyevent.t ..... 1/20 Please rebuild libcurl with AsynchDNS to
avoid blocking DNS requests
# loaded implementation: Net/Curl/Simple/Async/AnyEvent.pm
t/42-coro-anyevent.t ..... ok
t/43-coro-select.t ....... 1/20 Please rebuild libcurl with AsynchDNS to
avoid blocking DNS requests
t/43-coro-select.t ....... 3/20 # loaded implementation:
Net/Curl/Simple/Async/Select.pm
t/43-coro-select.t ....... ok
t/90-pod.t ............... ok
t/91-pod-coverage.t ...... skipped: Author test. Set $ENV{TEST_AUTHOR}
to a true value to run.
Test Summary Report
-------------------
t/40-coro-any.t (Wstat: 512 Tests: 20 Failed: 2)
Failed tests: 2, 11
Non-zero exit status: 2
Files=15, Tests=193, 5 wallclock secs ( 0.07 usr 0.04 sys + 0.68 cusr
0.12 csys = 0.91 CPU)
Result: FAIL
1[am]king ~/build/perl/Net-Curl-Simple-0.10$