diff options
author | Steve Peters <steve@fisharerojo.org> | 2007-11-20 17:51:05 +0000 |
---|---|---|
committer | Steve Peters <steve@fisharerojo.org> | 2007-11-20 17:51:05 +0000 |
commit | f8abf63d971b7a3d0537194a9e7c6f1484e569eb (patch) | |
tree | 0e820dadf08ea67a312ede3f13a5ee685f5ca455 /lib/Net | |
parent | e9e0c7d0b2a1ee40990c1a0b448b0bdc5d1d294c (diff) | |
download | perl-f8abf63d971b7a3d0537194a9e7c6f1484e569eb.tar.gz |
Skip the udp ping tests if testing on Vista. Also, switched
the getservbyname() call to check for a udp echo port.
p4raw-id: //depot/perl@32428
Diffstat (limited to 'lib/Net')
-rw-r--r-- | lib/Net/Ping/t/510_ping_udp.t | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/lib/Net/Ping/t/510_ping_udp.t b/lib/Net/Ping/t/510_ping_udp.t index 35f44fdd9c..ce55a7d1fc 100644 --- a/lib/Net/Ping/t/510_ping_udp.t +++ b/lib/Net/Ping/t/510_ping_udp.t @@ -1,12 +1,24 @@ # Test to perform udp protocol testing. +sub isWindowsVista { + return unless $^O eq 'MSWin32' or $^O eq "cygwin"; + return unless eval { require Win32 }; + return unless defined &Win32::GetOSName; + return Win32::GetOSName() eq "WinVista"; +} + BEGIN { unless (eval "require Socket") { print "1..0 \# Skip: no Socket\n"; exit; } - unless (getservbyname('echo', 'tcp')) { - print "1..0 \# Skip: no echo port\n"; + unless (getservbyname('echo', 'udp')) { + print "1..0 \# Skip: no udp echo port\n"; + exit; + } + + if(isWindowsVista()) { + print "1..0 \# Skip: udp ping blocked by Vista's default settings\n"; exit; } } |