Skip Menu |

This queue is for tickets about the libwww-perl CPAN distribution.

Report information
The Basics
Id: 42866
Status: resolved
Priority: 0/
Queue: libwww-perl

People
Owner: Nobody in particular
Requestors: iank [...] cpan.org
Cc:
AdminCc:

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



Subject: local/chunked.t failures if 127.0.0.1:8333 is in use
chunked.t should skip tests if it fails to bind to 8333 (or try another port). Test output (this user had an bot listening on 127.0.0.1:8333): local/chunked.............HTTP::Daemon: Address already in use ...propagated at local/chunked.t line 151. # Failed test '[629] traditional, unchunked POST request' # in local/chunked.t at line 143. # got: undef # expected: '629' local/chunked.............NOK 1 # Failed test '[8] chunked with illegal Content-Length header; tiny message' # in local/chunked.t at line 143. # got: undef # expected: '8' local/chunked.............NOK 2 # Failed test '[868] chunked with illegal Content-Length header; medium sized' # in local/chunked.t at line 143. # got: undef # expected: '868' local/chunked.............NOK 3 # Failed test '[1104] chunked correctly, size ~1k; base for the big next test' # in local/chunked.t at line 143. # got: undef # expected: '1104' local/chunked.............NOK 4 # Failed test '[1130496] chunked with many chunks' # in local/chunked.t at line 143. # got: undef # expected: '1130496' # Looks like you failed 5 tests of 5. local/chunked.............dubious Test returned status 5 (wstat 1280, 0x500) DIED. FAILED tests 1-5 Failed 5/5 tests, 0.00% okay local/get.................ok local/http-get............ok local/http................ok local/protosub............ok Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------------- local/chunked.t 5 1280 5 5 100.00% 1-5 6 subtests skipped. Failed 1/36 test scripts, 97.22% okay. 5/1064 subtests failed, 99.53% okay. make: *** [test] Error 255 /usr/bin/make test -- NOT OK Running make install make test had returned bad status, won't install without force
diff attached. Skips tests if it can't listen on 0.0.0.0:8333.
--- libwww-perl-5.823/t/local/chunked.t 2008-11-25 15:07:09.000000000 -0500 +++ libwww-perl-5.823-new/t/local/chunked.t 2009-01-28 15:34:15.000000000 -0500 @@ -94,10 +94,18 @@ my $tests = @TESTS; +my $tsock = IO::Socket::INET->new(LocalAddr => '0.0.0.0', + LocalPort => 8333, + Listen => 1, + ReuseAddr => 1); if (!$can_fork) { plan skip_all => "This system cannot fork"; } +elsif (!$tsock) { + plan skip_all => "Cannot listen on 0.0.0.0:8333"; +} else { + close $tsock; plan tests => $tests; }
Patch applied. Thanks!