HomeFreeBSD

libc/tests: enable getaddrinfo(1) tests from NetBSD

Description

libc/tests: enable getaddrinfo(1) tests from NetBSD

Enable running of contrib/netbsd-tests/lib/libc/net/getaddrinfo without
modifications to the test program itself. However, create our own version
of expected results files. They are produced from the NetBSD files, with
the following list of changes:

o AF_INET6 value is different, hence: s/family 24/family 28/.
o SCTP result (socktype 5 protocol 132) needs to be added to many queries

results.

o NetBSD libc sorts multiple results first by protocol, then by address

family.  FreeBSD first sorts on address family, then on protocol.  Some
results need to be reordered.

o Error strings need to be fixed:

s/hostname nor servname provided, or not known/Name does not resolve/
s/ai_family not supported/Address family not recognized/
s/servname not supported for ai_socktype/\
Service was not recognized for socket type/.

Reviewed by: ngie, kib
Differential Revision: https://reviews.freebsd.org/D49409

Details

Provenance
glebiusAuthored on Mar 28 2025, 9:32 PM
Reviewer
ngie
Differential Revision
D49409: libc/tests: enable getaddrinfo(1) tests from NetBSD
Parents
rGd8482e1b3e14: athpoke: Use a format string with err()
Branches
Unknown
Tags
Unknown