From: David McLean Date: Fri, 5 Sep 1997 00:00:00 +0000 (+0000) Subject: tests fail if localhost/loopback address not defined X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=68820cec9a0fb77bcbecf5e51947ef23cb6671eb;p=p5sagit%2Fp5-mst-13.2.git tests fail if localhost/loopback address not defined Subject: HPUX Perl problem Larry: I did a sh Configure -des after downloading perl5.004_03. This was done on workstation running HPUX 10.20. All looked normal. Then I did a make and everything also looked normal. However the test resulted in: lib/io_sock.......Bad file number at ./lib/io_sock.t line 55. FAILED at test 2 lib/io_udp........Can't call method "sockname" without a package or object reference at ./lib/io_udp.t line 35. FAILED at test 2 lib/odbm..........Bad free() ignored at ./lib/odbm.t line 63. Bad free() ignored at (eval 4) line 2. p5p-msgid: 34048947.2944@icc.gsfc.nasa.gov --- diff --git a/t/lib/io_sock.t b/t/lib/io_sock.t index 06a973c..0971e78 100755 --- a/t/lib/io_sock.t +++ b/t/lib/io_sock.t @@ -52,6 +52,10 @@ if($pid = fork()) { } elsif(defined $pid) { + # This can fail if localhost is undefined or the + # special 'loopback' address 127.0.0.1 is not configured + # on your system. (/etc/rc.config.d/netconfig on HP-UX.) + $sock = IO::Socket::INET->new(PeerPort => $port, Proto => 'tcp', PeerAddr => 'localhost' diff --git a/t/lib/io_udp.t b/t/lib/io_udp.t index d8377f6..3e16714 100755 --- a/t/lib/io_udp.t +++ b/t/lib/io_udp.t @@ -27,6 +27,10 @@ print "1..3\n"; use Socket; use IO::Socket qw(AF_INET SOCK_DGRAM INADDR_ANY); + # This can fail if localhost is undefined or the + # special 'loopback' address 127.0.0.1 is not configured + # on your system. (/etc/rc.config.d/netconfig on HP-UX.) + $udpa = IO::Socket::INET->new(Proto => 'udp', LocalAddr => 'localhost'); $udpb = IO::Socket::INET->new(Proto => 'udp', LocalAddr => 'localhost');