In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/04093f69db5aa7a5af5452eaf78dee1f9bc64b21?hp=ad6ab6c50584b455ffb6a48d18fb6409bea8a3c1>

- Log -----------------------------------------------------------------
commit 04093f69db5aa7a5af5452eaf78dee1f9bc64b21
Author: Ali Polatel <[email protected]>
Date:   Fri Oct 15 17:15:34 2010 -0700

    dist/IO: Always bind to localhost in tests.
    
    This is necessary on Exherbo, at least, because of the network
    sandboxing that is done by 'sydbox'. And, in general, tests shouldn't be
    listening on all interfaces.
-----------------------------------------------------------------------

Summary of changes:
 dist/IO/t/io_multihomed.t |    3 ++-
 dist/IO/t/io_sock.t       |    7 ++++---
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/dist/IO/t/io_multihomed.t b/dist/IO/t/io_multihomed.t
index f1bd5b9..f2a8e11 100644
--- a/dist/IO/t/io_multihomed.t
+++ b/dist/IO/t/io_multihomed.t
@@ -74,7 +74,8 @@ package main;
 
 use IO::Socket;
 
-$listen = IO::Socket::INET->new(Listen => 2,
+$listen = IO::Socket::INET->new(LocalAddr => 'localhost',
+                               Listen => 2,
                                Proto => 'tcp',
                                Timeout => 5,
                               ) or die "$!";
diff --git a/dist/IO/t/io_sock.t b/dist/IO/t/io_sock.t
index 38aefee..9c964f0 100644
--- a/dist/IO/t/io_sock.t
+++ b/dist/IO/t/io_sock.t
@@ -36,7 +36,8 @@ eval {
 
 use IO::Socket;
 
-$listen = IO::Socket::INET->new(Listen => 2,
+$listen = IO::Socket::INET->new(LocalAddr => 'localhost',
+                               Listen => 2,
                                Proto => 'tcp',
                                # some systems seem to need as much as 10,
                                # so be generous with the timeout
@@ -97,7 +98,7 @@ if($pid = fork()) {
 
 # Test various other ways to create INET sockets that should
 # also work.
-$listen = IO::Socket::INET->new(Listen => '', Timeout => 15) or die "$!";
+$listen = IO::Socket::INET->new(LocalAddr => 'localhost', Listen => '', 
Timeout => 15) or die "$!";
 $port = $listen->sockport;
 
 if($pid = fork()) {
@@ -224,7 +225,7 @@ if( !open( SRC, "< $0")) {
 ### TEST 16
 ### Start the server
 #
-my $listen = IO::Socket::INET->new( Listen => 2, Proto => 'tcp', Timeout => 
15) ||
+my $listen = IO::Socket::INET->new(LocalAddr => 'localhost', Listen => 2, 
Proto => 'tcp', Timeout => 15) ||
     print "not ";
 print "ok 16\n";
 die if( !defined( $listen));

--
Perl5 Master Repository

Reply via email to