develooper Front page | perl.perl5.porters | Postings from May 2004

Re: Smoke [5.9.2] 22689 FAIL(F) MSWin32 WinXP/.Net SP1 (x86/1 cpu)

Thread Previous | Thread Next
From:
Marcus Holland-Moritz
Date:
May 6, 2004 13:37
Subject:
Re: Smoke [5.9.2] 22689 FAIL(F) MSWin32 WinXP/.Net SP1 (x86/1 cpu)
Message ID:
20040506223730.4ab10058@r2d2
On 2004-04-13, at 11:32:13 +0100, Steve Hay wrote:

> Steve Hay wrote:
> 
> >Automated smoke report for 5.9.2 patch 22689
> >Summary: FAIL(F)
> >    ../lib/Net/t/datasend.t.................FAILED 2-15
> >  
> >
> This was presumably caused by change 22686 - sync with libnet 1.18.
> 
> Looking at the changes to Net::Cmd, I don't think I'll be figuring this 
> one out anytime soon :-s  Here's the output I'm getting from that test:
> 
> [...]

The problem is in Net::Cmd::datasend (or in Windows...):

 while($len)
  {
   my $wout;
   if (select(undef,$wout=$win, undef, $timeout) > 0)
    {
     my $w = syswrite($cmd, $line, $len, $offset);
     unless (defined($w))
      {
       carp("$cmd: $!") if $cmd->debug;
       return undef;
      }
     $len -= $w;
     $offset += $w;
    }
   else
    {
     carp("$cmd: Timeout") if($cmd->debug);
     return undef;
    }
  }

The select() call returns -1, which indicates a SOCKET_ERROR on
Windows. The error is WSAENOSOCK, which means that at least one
of the filehandles passed to select() is not a socket. Actually,
the only filehandle passed to select() is to a temporary file.

I assume that you may not use Windoze select() on filehandles
that are not sockets.

As the select() call fails, this is interpreted as a timeout,
which makes the tests fail. Simply ignoring the return value of
select() makes the tests pass.

I'm not sure what the correct fix should be...

Marcus

-- 
System going down at 1:45 this afternoon for disk crashing.

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About