[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
servent: Add tests.
From: |
Collin Funk |
Subject: |
servent: Add tests. |
Date: |
Mon, 30 Dec 2024 19:15:02 -0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
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
- servent: Add tests.,
Collin Funk <=