develooper Front page | perl.perl5.porters | Postings from September 2014

Re: [perl #122657] t/io/socket.t failing on hurd: peer from recv()should be empty or the remote name

Thread Previous
From:
Svante Signell
Date:
September 25, 2014 13:12
Subject:
Re: [perl #122657] t/io/socket.t failing on hurd: peer from recv()should be empty or the remote name
Message ID:
1411645952.28919.116.camel@G3620.my.own.domain
On Thu, 2014-09-25 at 11:28 +0200, Svante Signell wrote:
> On Thu, 2014-09-25 at 10:51 +0200, Svante Signell wrote:
> > On Wed, 2014-09-24 at 14:32 -0700, Leon Timmermans via RT wrote:
> > > On Tue, Sep 23, 2014 at 2:32 AM, Tony Cook via RT <perlbug-followup@perl.org
> > > > wrote:
> > > 
> > > > If it compared against getpeername(), would that pass?
> > > >
> > > > As you say, comparing against the bind address is just plain wrong.
> > > >
> > > > I don't have ready access to Hurd.
> > > >
> > > 
> > > Yes, that would be a more sensible test. Patch to that effect attached.
> > 
> > FYI: With your patch the test still fails on GNU/Hurd :(
> 
> The attached patch make the test work on GNU/Hurd
> (but not on GNU/Linux since in that case $recv_peer is empty, and
> my ($recv_port, $recv_addr) = sockaddr_in($recv_peer);
> fails.)

Attached is a patch that works on Linux, kFreeBSD and Hurd:
Linux and kFreeBSD returns the empty string, Hurd does not.

OK?



Thread Previous


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