I added a simple test for the servent module. All it does is check that
the function prototypes of getservbyname and getservbyport are correct
and that the functions can be called. Therefore it will fail if
$(SERVENT_LIB) is set incorrectly.

POSIX says [1]:

    This information [serivces] is considered to be stored in a
    database that can be accessed sequentially or randomly. The
    implementation of this database is unspecified.

And does not explicitly say if any services are required. Because of
that, I did not test the behavior of the functions.

Though, in practice I believe every OS (unsure about Windows) uses
/etc/services. So maybe it is best to just assume it will work normally
and improve the tests.

Collin

[1] 
https://pubs.opengroup.org/onlinepubs/9799919799/functions/getservbyname.html

Reply via email to