#
de630815 |
| 04-Dec-2022 |
jschauma <jschauma@NetBSD.org> |
allow testing of files other than those in /etc
To test e.g., the file "/some/where/protocols" instead of "/etc/protocols", set TEST_FILE=/some/where/protocols in your environment.
Note: this now c
allow testing of files other than those in /etc
To test e.g., the file "/some/where/protocols" instead of "/etc/protocols", set TEST_FILE=/some/where/protocols in your environment.
Note: this now compares the contents of the file you gave versus what getprotoent(3)/getservent(3) uses (which still is /etc/protocols via h_protoent.c / /etc/services or /var/db/services.cdb via h_servent.c).
When you have expected changes in the services or protocols file that you're generating, this necessarily produces a difference. To really allow testing the file versus what the library function returns, you'd have to install the file on the system running the test, but at least with this change you can now generate the file and verify that it didn't caused unexpected differences.
show more ...
|