History log of /netbsd-src/tests/lib/libc/net/t_servent.sh (Results 1 – 4 of 4)
Revision Date Author Comments
# 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 ...


# 76292795 04-Dec-2022 jschauma <jschauma@NetBSD.org>

whitespace


# 1c9e147d 08-Mar-2016 joerg <joerg@NetBSD.org>

libc fallback is known to not produce nice alias entries. Avoid spurious
failures when testing in an empty chroot by requiring the services db.


# 2517c83d 12-Jan-2011 pgoyette <pgoyette@NetBSD.org>

Move the servent and protoent tests to src/tests/lib/libc/net/ (where
they should have gone initially).