r68395 - in /trunk/libpoe-component-client-ping-perl: CHANGES MANIFEST META.yml Makefile.PL Ping.pm README debian/changelog lib/ t/00_info.t t/01_ping.t t/02_arbitrary_data.t t/03_provided_socket.t t/04_timeout_retry.t
gregoa at users.alioth.debian.org
gregoa at users.alioth.debian.org
Fri Feb 11 21:18:06 UTC 2011
Author: gregoa
Date: Fri Feb 11 21:16:52 2011
New Revision: 68395
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=68395
Log:
* New upstream release.
Added:
trunk/libpoe-component-client-ping-perl/lib/
- copied from r68393, branches/upstream/libpoe-component-client-ping-perl/current/lib/
trunk/libpoe-component-client-ping-perl/t/00_info.t
- copied unchanged from r68393, branches/upstream/libpoe-component-client-ping-perl/current/t/00_info.t
trunk/libpoe-component-client-ping-perl/t/02_arbitrary_data.t
- copied unchanged from r68393, branches/upstream/libpoe-component-client-ping-perl/current/t/02_arbitrary_data.t
trunk/libpoe-component-client-ping-perl/t/03_provided_socket.t
- copied unchanged from r68393, branches/upstream/libpoe-component-client-ping-perl/current/t/03_provided_socket.t
trunk/libpoe-component-client-ping-perl/t/04_timeout_retry.t
- copied unchanged from r68393, branches/upstream/libpoe-component-client-ping-perl/current/t/04_timeout_retry.t
Removed:
trunk/libpoe-component-client-ping-perl/Ping.pm
Modified:
trunk/libpoe-component-client-ping-perl/CHANGES
trunk/libpoe-component-client-ping-perl/MANIFEST
trunk/libpoe-component-client-ping-perl/META.yml
trunk/libpoe-component-client-ping-perl/Makefile.PL
trunk/libpoe-component-client-ping-perl/README
trunk/libpoe-component-client-ping-perl/debian/changelog
trunk/libpoe-component-client-ping-perl/t/01_ping.t
Modified: trunk/libpoe-component-client-ping-perl/CHANGES
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpoe-component-client-ping-perl/CHANGES?rev=68395&op=diff
==============================================================================
--- trunk/libpoe-component-client-ping-perl/CHANGES (original)
+++ trunk/libpoe-component-client-ping-perl/CHANGES Fri Feb 11 21:16:52 2011
@@ -1,79 +1,99 @@
-=========================
-2004-05-31 17:24:07 v1_04
-=========================
+================================
+2009-12-19 17:01:44 -0500 v1_163
+================================
- 2004-05-31 17:24:07 by rcaputo; Ping.pm 1.19
+ commit 27b7665de4fa1e3b3960720ddd83632f21c60497
+ Author: Rocco Caputo <rcaputo at cpan.org>
+ Date: Sat Dec 19 17:01:44 2009 -0500
+
+ Avoid "UNKNOWN" reports from CPAN testers. All tests were skipped
+ when not tested as root, so add a test for non-root users.
- More documentation revisions.
+================================
+2009-10-14 18:00:18 -0400 v1_162
+================================
-=========================
-2004-05-31 16:34:47 v1_03
-=========================
+ commit 65682a45ea5d0ecd93625389e4fe2372334bd3f7
+ Author: Rocco Caputo <rcaputo at cpan.org>
+ Date: Wed Oct 14 18:00:18 2009 -0400
+
+ A test was failing rather than skipping due to insufficient
+ privileges.
- 2004-05-31 16:34:47 by rcaputo; Ping.pm 1.18
+================================
+2009-09-12 18:56:44 -0400 v1_161
+================================
- Massively revised the documentation. I tried to look something up for
- Leigh Sharpe, and it was just a mess in there.
-
- Fixed cases where the user data was not passed through. Mostly during
- request errors. This is related to Leigh's question on POE's mailing
- list.
-
- Bumped the version number up for a CPAN release.
+ commit 850b00fc1e9f70833ab36ac13a2b38d134e2c6af
+ Author: Rocco Caputo <rcaputo at cpan.org>
+ Date: Sat Sep 12 18:56:44 2009 -0400
+
+ Standardize layout and prepare for next release.
-=========================
-2004-03-09 15:22:05 v1_02
-=========================
+ commit 420df6d9d9345a5ed294eb4fec88bf14d8a41266
+ Author: Rocco Caputo <rcaputo at cpan.org>
+ Date: Sat Sep 12 18:48:25 2009 -0400
+
+ Add test for timeouts inflating retried response times.
- 2004-03-09 15:22:05 by rcaputo; Ping.pm 1.17
+ commit 6cd8830b9f822296ecbe7db0633502d9cf4e3195
+ Author: Ralph Schmitt <ralph.schmitt at ish.de>
+ Date: Sat Sep 12 18:14:32 2009 -0400
+
+ Compensate for timeout when retrying.
- Boris Rekhtman reported a "hang" condition when addresses don't
- resolve. Thanks to his test case, it was tracked down to a leftover
- socket not being cleaned up if the ping failed early. This commit
- refactors the socket closure code, fixing his problem and at least
- one other.
+ Ralph Schmitt discovered that the response time each retry would
+ increase by the timeout period. He provided this change to
+ compensate.
- 2004-02-13 02:23:56 by rcaputo; Ping.pm 1.16
+ commit 1ed1c1da115bbd7b8e63eff439225c5fe6d664ff
+ Author: Rocco Caputo <rcaputo at cpan.org>
+ Date: Sat Sep 12 17:12:28 2009 -0400
+
+ Convert files and release workflow from svn to git.
- Don't try to process a packet if recv() fails.
+================================
+2009-07-28 06:31:09 +0000 v1_160
+================================
-=========================
-2004-01-23 17:26:23 v1_01
-=========================
+ commit 96f372e227aa190a221394805eb9d6ae76fdb7ee
+ Author: Rocco Caputo <rcaputo at cpan.org>
+ Date: Tue Jul 28 06:31:09 2009 +0000
+
+ Use latest POE, and prepare for a new release.
- 2004-01-23 17:26:23 by rcaputo; Ping.pm 1.15
+ commit 24380582236a0354365aa68d0709e5340c52abff
+ Author: Rocco Caputo <rcaputo at cpan.org>
+ Date: Mon Jul 27 04:56:40 2009 +0000
+
+ Added a machine-readable repository directory to the distribution.
+ Documented the bug tracker, repository, and other resource URLs.
- Bump the version number up.
+===============================
+2009-07-25 17:26:55 +0000 v1_15
+===============================
- 2004-01-23 17:25:37 by rcaputo; MANIFEST 1.3; Ping.pm 1.14
+ commit 1228b4e483109d37bd49193479fdc85f866401bd
+ Author: Rocco Caputo <rcaputo at cpan.org>
+ Date: Sat Jul 25 17:26:55 2009 +0000
+
+ Resolve rt.cpan.org ticket 35738. Isaacson rightly pointed out that
+ the component would never end if an application gave it its own raw
+ socket. Now the component will stop watching the socket when there's
+ nothing to do, which will allow it to exit if the rest of the program
+ is also stopping. Added a test case for the condition, too.
- Improve sequence number tracking and cleanup.
+ commit 8ea6ea61ca8fda54612f1964ff028e7d982f290d
+ Author: Rocco Caputo <rcaputo at cpan.org>
+ Date: Sat Jul 25 07:45:33 2009 +0000
+
+ Calculate a ballpark optimal Parallelism value by default.
+ Previously, the component would try to process as many simultaneous
+ requests as possible, often exceeding OS and network limits, and
+ either dropping packets or returning responses with patently bogus
+ round-trip times. Thanks to Dean Holroyd for rt.cpan.org #48171,
+ which this should resolve.
-=========================
-2003-12-07 17:57:58 v1_00
-=========================
-
- 2003-12-07 17:57:58 by rcaputo; Ping.pm 1.13
-
- Bump up the version!
-
- 2003-11-29 06:55:49 by rcaputo; Ping.pm 1.12; t/01_ping.t 1.6
-
- Applied Edward Henke's patch to correct a typo (and probably a memory
- leak) in a hash key. Also updated the test program with new ping
- targets, as the old ones seem to all be down for some reason.
-
-=========================
-2003-09-04 05:57:33 v0_99
-=========================
-
- 2003-09-04 05:57:33 by rcaputo; Ping.pm 1.11
-
- "Jim" on Usenet discovered that the component doesn't clean up after
- a OneReply response. This means the component lingers forever,
- preventing programs from exiting with OneReply enabled. This commit
- fixes that.
-
-=============================
-Beginning of Recorded History
-=============================
+==============
+End of Excerpt
+==============
Modified: trunk/libpoe-component-client-ping-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpoe-component-client-ping-perl/MANIFEST?rev=68395&op=diff
==============================================================================
--- trunk/libpoe-component-client-ping-perl/MANIFEST (original)
+++ trunk/libpoe-component-client-ping-perl/MANIFEST Fri Feb 11 21:16:52 2011
@@ -1,8 +1,11 @@
-# $Id: MANIFEST,v 1.3 2004/01/23 17:25:37 rcaputo Exp $
CHANGES
MANIFEST
Makefile.PL
-Ping.pm
+lib/POE/Component/Client/Ping.pm
README
+t/00_info.t
t/01_ping.t
+t/02_arbitrary_data.t
+t/03_provided_socket.t
+t/04_timeout_retry.t
META.yml Module meta-data (added by MakeMaker)
Modified: trunk/libpoe-component-client-ping-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpoe-component-client-ping-perl/META.yml?rev=68395&op=diff
==============================================================================
--- trunk/libpoe-component-client-ping-perl/META.yml (original)
+++ trunk/libpoe-component-client-ping-perl/META.yml Fri Feb 11 21:16:52 2011
@@ -1,12 +1,26 @@
-# http://module-build.sourceforge.net/META-spec.html
-#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
-name: POE-Component-Client-Ping
-version: 1.04
-version_from: Ping.pm
-installdirs: site
+--- #YAML:1.0
+name: POE-Component-Client-Ping
+version: 1.163
+abstract: POE component for non-blocking/concurrent ICMP ping.
+author:
+ - Rocco Caputo <rcaputo at cpan.org>
+license: perl
+distribution_type: module
+configure_requires:
+ ExtUtils::MakeMaker: 0
+build_requires:
+ ExtUtils::MakeMaker: 0
requires:
- POE: 0.11
- Time::HiRes: 1.2
-
-distribution_type: module
-generated_by: ExtUtils::MakeMaker version 6.17
+ POE: 1.007
+ Time::HiRes: 1.2
+resources:
+ license: http://dev.perl.org/licenses/
+ repository: http://github.com/rcaputo/poe-component-client-ping/
+no_index:
+ directory:
+ - t
+ - inc
+generated_by: ExtUtils::MakeMaker version 6.54
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.4.html
+ version: 1.4
Modified: trunk/libpoe-component-client-ping-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpoe-component-client-ping-perl/Makefile.PL?rev=68395&op=diff
==============================================================================
--- trunk/libpoe-component-client-ping-perl/Makefile.PL (original)
+++ trunk/libpoe-component-client-ping-perl/Makefile.PL Fri Feb 11 21:16:52 2011
@@ -1,26 +1,31 @@
#!/usr/bin/perl
-# $Id: Makefile.PL,v 1.3 2002/09/10 03:35:21 rcaputo Exp $
use ExtUtils::MakeMaker;
# Touch CHANGES so it exists.
open(CHANGES, ">>CHANGES") and close CHANGES;
-WriteMakefile
- ( NAME => 'POE::Component::Client::Ping',
- AUTHOR => 'Rocco Caputo <rcaputo at cpan.org>',
- ABSTRACT => 'POE component for non-blocking/concurrent ICMP ping.',
- VERSION_FROM => 'Ping.pm',
-
- PM => { 'Ping.pm' => '$(INST_LIBDIR)/Ping.pm' },
- PREREQ_PM => { POE => 0.11,
- Time::HiRes => 1.20,
- },
- dist =>
- { COMPRESS => 'gzip -9f',
- SUFFIX => 'gz',
- PREOP => ( 'cvs-log.perl | ' .
- 'tee ./$(DISTNAME)-$(VERSION)/CHANGES > ./CHANGES'
- ),
+WriteMakefile(
+ NAME => 'POE::Component::Client::Ping',
+ AUTHOR => 'Rocco Caputo <rcaputo at cpan.org>',
+ ABSTRACT => 'POE component for non-blocking/concurrent ICMP ping.',
+ LICENSE => 'perl',
+ VERSION_FROM => 'lib/POE/Component/Client/Ping.pm',
+ META_ADD => {
+ resources => {
+ license => 'http://dev.perl.org/licenses/',
+ repository => 'http://github.com/rcaputo/poe-component-client-ping/'
},
- );
+ },
+ PREREQ_PM => {
+ 'POE' => 1.007,
+ 'Time::HiRes' => 1.20,
+ },
+ dist => {
+ COMPRESS => 'gzip -9f',
+ SUFFIX => 'gz',
+ PREOP => (
+ 'git-log.pl | tee ./$(DISTNAME)-$(VERSION)/CHANGES > ./CHANGES'
+ ),
+ },
+);
Modified: trunk/libpoe-component-client-ping-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpoe-component-client-ping-perl/README?rev=68395&op=diff
==============================================================================
--- trunk/libpoe-component-client-ping-perl/README (original)
+++ trunk/libpoe-component-client-ping-perl/README Fri Feb 11 21:16:52 2011
@@ -1,5 +1,3 @@
-$Id: README,v 1.2 2001/05/29 16:51:39 rcaputo Exp $
-
--------
Abstract
--------
Modified: trunk/libpoe-component-client-ping-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpoe-component-client-ping-perl/debian/changelog?rev=68395&op=diff
==============================================================================
--- trunk/libpoe-component-client-ping-perl/debian/changelog (original)
+++ trunk/libpoe-component-client-ping-perl/debian/changelog Fri Feb 11 21:16:52 2011
@@ -1,17 +1,17 @@
-libpoe-component-client-ping-perl (1.04-3) UNRELEASED; urgency=low
+libpoe-component-client-ping-perl (1.163-1) UNRELEASED; urgency=low
- * NOT RELEASED YET
* Take over for the Debian Perl Group on maintainer's request
(http://lists.debian.org/debian-devel/2011/02/msg00217.html)
* debian/control: Added: Vcs-Svn field (source stanza); Vcs-Browser
field (source stanza); ${misc:Depends} to Depends: field. Changed:
Maintainer set to Debian Perl Group <pkg-perl-
maintainers at lists.alioth.debian.org> (was: Decklin Foster
- <decklin at red-bean.com>); Decklin Foster <decklin at red-bean.com> moved
- to Uploaders.
+ <decklin at red-bean.com>)
* Add debian/watch.
- -- gregor herrmann <gregoa at debian.org> Fri, 11 Feb 2011 17:18:27 +0100
+ * New upstream release.
+
+ -- gregor herrmann <gregoa at debian.org> Fri, 11 Feb 2011 22:14:58 +0100
libpoe-component-client-ping-perl (1.04-1) unstable; urgency=low
Modified: trunk/libpoe-component-client-ping-perl/t/01_ping.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpoe-component-client-ping-perl/t/01_ping.t?rev=68395&op=diff
==============================================================================
--- trunk/libpoe-component-client-ping-perl/t/01_ping.t (original)
+++ trunk/libpoe-component-client-ping-perl/t/01_ping.t Fri Feb 11 21:16:52 2011
@@ -1,9 +1,7 @@
#!/usr/bin/perl -w
-# $Id: 01_ping.t,v 1.6 2003/11/29 06:55:49 rcaputo Exp $
+# vim: filetype=perl
use strict;
-
-use lib '/home/troc/perl/poe';
BEGIN {
$| = 1;
@@ -15,8 +13,7 @@
sub POE::Kernel::ASSERT_DEFAULT () { 1 }
use POE qw(Component::Client::Ping);
-
-print "1..4\n";
+use Test::More tests => 2;
sub PING_TIMEOUT () { 5 }; # seconds between pings
sub PING_COUNT () { 1 }; # ping repetitions
@@ -59,12 +56,13 @@
$heap->{requests}++;
$heap->{ping_counts}->{$address}++;
- $kernel->post( 'pinger', # Post the request to the 'pinger'.
- 'ping', # Ask it to 'ping' an address.
- 'pong', # Have it post an answer to my 'pong' state.
- $address, # This is the address we want it to ping.
- PING_TIMEOUT # This is the optional time to wait.
- );
+ $kernel->post(
+ 'pinger', # Post the request to the 'pinger'.
+ 'ping', # Ask it to 'ping' an address.
+ 'pong', # Have it post an answer to my 'pong' state.
+ $address, # This is the address we want it to ping.
+ PING_TIMEOUT # This is the optional time to wait.
+ );
}
sub client_got_pong {
@@ -72,23 +70,34 @@
@_[KERNEL, SESSION, HEAP, ARG0, ARG1];
my ($request_address, $request_timeout, $request_time) = @{$request_packet};
- my ($response_address, $roundtrip_time, $reply_time) = @{$response_packet};
+ my (
+ $response_address, $roundtrip_time, $reply_time, $reply_ttl
+ ) = @{$response_packet};
if (defined $response_address) {
- DEBUG and warn
- sprintf( "%d: ping to %-15.15s at %10d. pong from %-15.15s in %6.3f s\n",
- $session->ID,
- $request_address, $request_time,
- $response_address, $roundtrip_time
- );
+ DEBUG and warn(
+ sprintf(
+ "%d: ping to %-15.15s at %10d. " .
+ "pong from %-15.15s in %6.3f s (ttl %3d)\n",
+ $session->ID,
+ $request_address, $request_time,
+ $response_address, $roundtrip_time, $reply_ttl,
+ )
+ );
$heap->{answers}++ if $roundtrip_time <= $request_timeout;
+ $heap->{bad_ttl}++ if (
+ $reply_ttl !~ /^\d+$/ or
+ $reply_ttl < 0 or
+ $reply_ttl > 255
+ );
}
else {
DEBUG and warn( $session->ID, ": time's up for $request_address...\n" );
- $kernel->yield(ping => $request_address)
- if $heap->{ping_counts}->{$request_address} < PING_COUNT;
+ $kernel->yield(ping => $request_address) if (
+ $heap->{ping_counts}->{$request_address} < PING_COUNT
+ );
$heap->{dones}++;
}
@@ -98,38 +107,38 @@
my ($session, $heap) = @_[SESSION, HEAP];
DEBUG and warn( $session->ID, ": pinger client session stopped...\n" );
- print 'not ' unless ( $heap->{requests} == $heap->{dones} and
- $heap->{answers}
- );
- print 'ok ', ($session->ID() - 1), "\n";
+ ok(
+ (
+ $heap->{requests} == $heap->{dones}
+ && $heap->{answers}
+ && !$heap->{bad_ttl}
+ ),
+ "pinger client session got responses"
+ );
}
#------------------------------------------------------------------------------
# Create a pinger component.
-POE::Component::Client::Ping->spawn
- ( Alias => 'pinger', # This is the name it'll be known by.
- Timeout => PING_TIMEOUT, # This is how long it waits for echo replies.
- );
+POE::Component::Client::Ping->spawn(
+ Alias => 'pinger', # This is the name it'll be known by.
+ Timeout => PING_TIMEOUT, # This is how long it waits for echo replies.
+);
# Create two sessions that will use the pinger. This tests
# concurrency against the same addresses.
for (my $session_index = 0; $session_index < 2; $session_index++) {
- POE::Session->create
- ( inline_states =>
- { _start => \&client_start,
- _stop => \&client_stop,
- pong => \&client_got_pong,
- ping => \&client_send_ping,
- }
- );
+ POE::Session->create(
+ inline_states => {
+ _start => \&client_start,
+ _stop => \&client_stop,
+ pong => \&client_got_pong,
+ ping => \&client_send_ping,
+ }
+ );
}
-print "ok 1\n";
-
# Run it all until done.
-$poe_kernel->run();
-
-print "ok 4\n";
+POE::Kernel->run();
exit;
More information about the Pkg-perl-cvs-commits
mailing list