Karl,

I took a look at Net::Ping
Pingecho is a wrapper for ping from what I see.

sub pingecho
{
  my ($host,              # Name or IP number of host to ping
      $timeout            # Optional timeout in seconds
      ) = @_;
  my ($p);                # A ping object

  $p = Net::Ping->new("tcp", $timeout);
  $p->ping($host);        # Going out of scope closes the connection
}

Which in turn calls ping

# Description: Ping a host name or IP number with an optional timeout.
# First lookup the host, and return undef if it is not found.  Otherwise
# perform the specific ping method based on the protocol.  Return the
# result of the ping.

sub ping
{
  my ($self,
      $host,              # Name or IP number of host to ping
      $timeout,           # Seconds after which ping times out
      $family,            # Address family
      ) = @_;
  my ($ip,                # Hash of addr (string), addr_in (packed), family
      $ret,               # The return value
      $ping_time,         # When ping began
      );

  $host = $self->{host} if !defined $host and $self->{host};
  croak("Usage: \$p->ping([ \$host [, \$timeout [, \$family]]])") if @_ > 4 or 
!$host;
  $timeout = $self->{timeout} unless $timeout;
  croak("Timeout must be greater than 0 seconds") if $timeout <= 0;

  if ($family) {
    if ($family =~ $qr_family) {
      if ($family =~ $qr_family4) {
        $self->{family_local} = AF_INET;
      } else {
        $self->{family_local} = $AF_INET6;
      }
    } else {
      croak('Family must be "ipv4" or "ipv6"')
    }
  } else {
    $self->{family_local} = $self->{family};
  }
  
  $ip = $self->_resolv($host);
  return () unless defined($ip);      # Does host exist?

  # Dispatch to the appropriate routine.
  $ping_time = &time();
  if ($self->{proto} eq "external") {
    $ret = $self->ping_external($ip, $timeout);
  }
  elsif ($self->{proto} eq "udp") {
    $ret = $self->ping_udp($ip, $timeout);
  }
  elsif ($self->{proto} eq "icmp") {
    $ret = $self->ping_icmp($ip, $timeout);
  }
  elsif ($self->{proto} eq "icmpv6") {
    $ret = $self->ping_icmpv6($ip, $timeout);
  }
  elsif ($self->{proto} eq "tcp") {
    $ret = $self->ping_tcp($ip, $timeout);
  }
  elsif ($self->{proto} eq "stream") {
    $ret = $self->ping_stream($ip, $timeout);
  }
  elsif ($self->{proto} eq "syn") {
    $ret = $self->ping_syn($host, $ip, $ping_time, $ping_time+$timeout);
  } else {
    croak("Unknown protocol \"$self->{proto}\" in ping()");
  }

  return wantarray ? ($ret, &time() - $ping_time, $self->ntop($ip)) : $ret;
}

It has many return values so what would be helpful is knowing what Yaroslav's 
system is returning so see where it is dying.

I'm happy to help figure it out if you need the help.
I have a few thoughts that could be system dependent but knowing the exact 
return code would help allot.

Sandra

P.S.  sorry for the code paste in the thread  



-----Original Message-----
From: Karl Williamson [mailto:pub...@khwilliamson.com] 
Sent: Wednesday, December 07, 2016 1:09 AM
To: Yaroslav Kuzmin <ykuz...@rocketsoftware.com>; perl-...@perl.org; 
perl5-port...@perl.org
Cc: daily-build-reports@perl.org
Subject: [EXTERNAL] Re: Smoke [blead] v5.25.7-50-g4f738c7 FAIL(X) os/390 25.00 
(2964/)

Nationwide Information Security Warning: This is an external email. Do not 
click on links or open attachments unless you trust the sender.
------------------------------------------------------------------------------

On 12/06/2016 04:26 AM, Yaroslav Kuzmin wrote:
>
> Smoke log at available  
> https://drive.google.com/file/d/0B5PTttxwo7qAdG1UbDdncHNOdG8
>
> Automated smoke report for branch blead 5.25.8 patch 
> 4f738c750ddb40ef82b46158f89572739a8b186a v5.25.7-50-g4f738c7
>  RS12: 2964 (2964/)
>      on        os/390 - 25.00
>      using     c99 version
>      smoketime 5 hours 17 minutes (average 2 hours 38 minutes)
>
>  Summary: FAIL(X)
>
>  O = OK  F = Failure(s), extended report at the bottom  X = Failure(s) 
> under TEST but not under harness  ? = still running or test results 
> not (yet) available
>  Build failures during:       - = unknown or N/A
>  c = Configure, m = make, M = make (after miniperl), t = make 
> test-prep
>
>  v5.25.7-50-g4f738c7  Configuration (common) none
>  ----------- ---------------------------------------------------------
>  X X X X     -Dusedl
>  | | | +----- PERLIO = perlio -DDEBUGGING  | | +------- PERLIO = stdio  
> -DDEBUGGING  | +--------- PERLIO = perlio
>  +----------- PERLIO = stdio
>
>
>  Locally applied patches:
>      SMOKE4f738c750ddb40ef82b46158f89572739a8b186a
>
>  Tests skipped on user request:
>      # One test name on a line
>  Failures: (common-args) none
>  [stdio] -Dusedl
>  Inconsistent test results (between TEST and harness):
>      ../ext/XS-APItest/t/utf8.t.............. 
> ......................................... FAILED at test 157018
>      ../t/dist/Net-Ping/t/010_pingecho.t..... 
> .................................. FAILED at test 2
>      ../lib/warnings.t....................... 
> .................................................. FAILED at test 519
>      ../lib/locale.t......................... 
> .................................................... FAILED at test 
> 408

Thanks.  The APItest failures are down from a couple hundred to just 7, and 
those 7 are due to an oversight on my part, and there is a fix now in blead.  
Blead also contains a fix for the locale.t failure.

I cant figure out why the warnings.t failure is happening.  To that end, 
attached is a patch to apply to blead to add debugging info to help me. 
Compile with -DDEBUGGING, then manually

cd t
./perl -I../lib ../lib/warnings.t

and capture the output and send to me.

I do not know enough to know why the pingecho.t test is failed.  This is a 
recent addition.  It is trying to do a loopback test to 127.0.0.1.  Do you know 
of any reason this would fail on your system?  Maybe it isn't configured right? 
 If there is such a reason, how could we tell so as to skip the test?
>
>  [perlio] -Dusedl
>  Inconsistent test results (between TEST and harness):
>      ../ext/XS-APItest/t/utf8.t.............. 
> ......................................... FAILED at test 157018
>      ../lib/locale.t......................... 
> .................................................... FAILED at test 408
>      ../t/dist/Net-Ping/t/010_pingecho.t..... 
> .................................. FAILED at test 2
>      ../lib/warnings.t....................... 
> .................................................. FAILED at test 519
>
>  [stdio/perlio] -DDEBUGGING -Dusedl
>  Inconsistent test results (between TEST and harness):
>      ../lib/locale.t......................... 
> .................................................... FAILED at test 408
>      ../lib/warnings.t....................... 
> .................................................. FAILED at test 519
>      ../t/dist/Net-Ping/t/010_pingecho.t..... 
> .................................. FAILED at test 2
>      ../ext/XS-APItest/t/utf8.t.............. 
> ......................................... FAILED at test 157018
>
>  Compiler messages(os390):
>
>
>
>  --
>  Report by Test::Smoke v1.6 running on perl 5.22.0  (Reporter v0.052 / 
> Smoker v0.045)
>
>
> --
>
> Regards,
>
> Yaroslav Kuzmin
> Developer C/C++ ,z/OS , Linux
> 3 Zhukovskiy Street · Miass, Chelyabinsk region 456318 · Russia
> Tel:  +7.922.2.38.33.38
> Email: ykuz...@rocketsoftware.com
> Web: www.rocketsoftware.com
>
> ================================
> Rocket Software, Inc. and subsidiaries ■ 77 Fourth Avenue, Waltham MA 
> 02451 ■ +1 877.328.2932 ■ +1 781.577.4321 Unsubscribe from Marketing 
> Messages/Manage Your Subscription Preferences - 
> http://www.rocketsoftware.com/manage-your-email-preferences
> Privacy Policy - 
> http://www.rocketsoftware.com/company/legal/privacy-policy
> ================================
>
> This communication and any attachments may contain confidential information 
> of Rocket Software, Inc. All unauthorized use, disclosure or distribution is 
> prohibited. If you are not the intended recipient, please notify Rocket 
> Software immediately and destroy all copies of this communication. Thank you.
>

Reply via email to