Skip Menu |
 

This queue is for tickets about the Socket CPAN distribution.

Report information
The Basics
Id: 89766
Status: resolved
Priority: 0/
Queue: Socket

People
Owner: Nobody in particular
Requestors: craigberry [...] mac.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 2.013



Subject: [PATCH] getnameinfo and getaddrinfo test tweaks for VMS
Date: Thu, 24 Oct 2013 21:46:11 -0500
To: bugs-Socket [...] rt.cpan.org
From: "Craig A. Berry" <craigberry [...] mac.com>
Download (untitled) / with headers
text/plain 1.7k
VMS has had getnameinfo and getaddrinfo since ages, but we haven't been enabling them in the core configuration process. When I do so, a couple of test failures show up in Socket which I've fixed in the attached patch. getaddrinfo.t test 18. This test expects a single result for the lookup of service=80/family=AF_INET/socktype=STREAM, but we were getting two results, one for IPPROTO_TCP and another for IPPROTO_SCTP. Specifying a protocol of IPPROTO_TCP explicitly on input restricts us to one result and should be pretty safe as it's already in use elsewhere in the test script. The call to getaddrinfo with host=localhost/service=ftp/flags=AI_NUMERICHOST/socktype=SOCK_STREAM succeeded but was expected to fail. This smells like an actual bug in the VMS implementation. It kinda looks like they special-cased "localhost" so it's treated exactly like 127.0.0.1 and it considers the host numeric even when it's not. We could reasonably skip this test on VMS, but what I did instead was made it use "cpan.perl.org" instead of "localhost", which produces the expected failure. In getnameinfo.t, calling getnameinfo for a service that does not have a service name registered fails unless you specify NI_NUMERICSERV. It seems some implementations infer NI_NUMERICSERV when there is no service name, and the Linux man page even documents that behavior, but I can't find anything in the standard requiring it and the VMS implementation doesn't do it. So I add NI_NUMERICSERV explicitly to the flags for those cases where we fail to look up a service name. That gets all tests passing (also checked on OS X as well as VMS). Show quoted text
________________________________________ Craig A. Berry mailto:craigberry@mac.com "... getting out of a sonnet is much more difficult than getting in." Brad Leithauser

Message body is not shown because sender requested not to inline it.

Download (untitled) / with headers
text/plain 409b
On Thu Oct 24 22:46:39 2013, craigberry@mac.com wrote: Show quoted text
> VMS has had getnameinfo and getaddrinfo since ages, but we haven't > been enabling them in the core configuration process. When I do so, a > couple of test failures show up in Socket which I've fixed in the > attached patch.
Ah yes; three good bugfixes there. Those are now merged in and released as 2.013. Thanks for your effort :) -- Paul Evans
Released in 2.013. -- Paul Evans


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.