In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/bb1eeeaaacc55c5a842f572193603f2d9971c53b?hp=e6c837f56971637e07a467eafee1c813287e20e0>

- Log -----------------------------------------------------------------
commit bb1eeeaaacc55c5a842f572193603f2d9971c53b
Merge: e6c837f 062ba7d
Author: Tony Cook <[email protected]>
Date:   Thu Aug 2 10:28:02 2012 +1000

    fix icmp ping tests on cygwin

commit 062ba7dfd67b859636d1e9e70162750d23c653b2
Author: Tony Cook <[email protected]>
Date:   Fri Jul 27 23:47:05 2012 +1000

    Net-Ping: creating an icmp socket requires admin access on recent cygwin
    
    on recent Windows.
    
    cygwin on XP can create an icmp socket as a normal user but can't do
    anything with it.  On Vista or Win7 the process must be running as
    an admin to create the socket.
    
    If someone sees value in running the test on cygwin on XP, they can
    provide a patch.

M       dist/Net-Ping/t/110_icmp_inst.t

commit 284474f99fc795c352234baaaa45687e0a291d66
Author: Tony Cook <[email protected]>
Date:   Fri Jul 27 23:39:39 2012 +1000

    Net-Ping: add a sensible test note for the icmp ping test

M       dist/Net-Ping/t/500_ping_icmp.t

commit bb03e613e64ec996e5d1109519a069a5b8134bb2
Author: Tony Cook <[email protected]>
Date:   Fri Jul 27 23:38:59 2012 +1000

    fix the cygwin breakage introduced in 2f794ae1
    
    All modern Win32 systems* require admin access to use ICMP sockets from
    cygwin, the refactor in 2f794ae1 changed the condition for the skip,
    producing a failure here when the test is run unprivileged under
    cygwin.
    
    * assuming XP can be called modern

M       dist/Net-Ping/t/500_ping_icmp.t
-----------------------------------------------------------------------

Summary of changes:
 dist/Net-Ping/t/110_icmp_inst.t |    4 ++--
 dist/Net-Ping/t/500_ping_icmp.t |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/dist/Net-Ping/t/110_icmp_inst.t b/dist/Net-Ping/t/110_icmp_inst.t
index 7840657..b36d32f 100644
--- a/dist/Net-Ping/t/110_icmp_inst.t
+++ b/dist/Net-Ping/t/110_icmp_inst.t
@@ -16,7 +16,7 @@ BEGIN {use_ok('Net::Ping')};
 SKIP: {
   skip "icmp ping requires root privileges.", 1
     if ($> and $^O ne 'VMS' and $^O ne 'cygwin')
-      or ($^O eq 'MSWin32'
+      or (($^O eq 'MSWin32' or $^O eq 'cygwin')
          and !IsAdminUser())
        or ($^O eq 'VMS'
            and (`write sys\$output f\$privilege("SYSPRV")` =~ m/FALSE/));
@@ -25,7 +25,7 @@ SKIP: {
 }
 
 sub IsAdminUser {
-  return unless $^O eq 'MSWin32';
+  return unless $^O eq 'MSWin32' or $^O eq 'cygwin';
   return unless eval { require Win32 };
   return unless defined &Win32::IsAdminUser;
   return Win32::IsAdminUser();
diff --git a/dist/Net-Ping/t/500_ping_icmp.t b/dist/Net-Ping/t/500_ping_icmp.t
index 9fe6877..3050cc3 100644
--- a/dist/Net-Ping/t/500_ping_icmp.t
+++ b/dist/Net-Ping/t/500_ping_icmp.t
@@ -16,12 +16,12 @@ BEGIN {use_ok('Net::Ping')};
 SKIP: {
   skip "icmp ping requires root privileges.", 1
     if ($> and $^O ne 'VMS' and $^O ne 'cygwin')
-      or ($^O eq 'MSWin32'
+      or (($^O eq 'MSWin32' or $^O eq 'cygwin')
          and !IsAdminUser())
        or ($^O eq 'VMS'
            and (`write sys\$output f\$privilege("SYSPRV")` =~ m/FALSE/));
   my $p = new Net::Ping "icmp";
-  is($p->ping("127.0.0.1"), 1);
+  is($p->ping("127.0.0.1"), 1, "icmp ping 127.0.0.1");
 }
 
 sub IsAdminUser {

--
Perl5 Master Repository

Reply via email to