Page MenuHomeFreeBSD

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

Authored by glebius on Tue, Mar 18, 11:50 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Mar 28, 10:36 PM
Unknown Object (File)
Mon, Mar 24, 1:50 AM
Unknown Object (File)
Mon, Mar 24, 1:50 AM
Unknown Object (File)
Mon, Mar 24, 1:50 AM
Unknown Object (File)
Mon, Mar 24, 1:50 AM
Unknown Object (File)
Mon, Mar 24, 1:50 AM
Unknown Object (File)
Sun, Mar 23, 3:42 PM
Unknown Object (File)
Sun, Mar 23, 3:42 PM
Subscribers

Details

Summary

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 stores 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 needs 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/.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This is yet another example of the bad tests. They hardcode many details that are not guaranteed, so will break even for correct changes.

This revision is now accepted and ready to land.Sat, Mar 22, 4:56 AM