opnsense-src/lib/libc/tests/net/Makefile
Lexi Winter e0d2ca9de6 libc tests: add tests for link_addr(3) and link_ntoa(3)
for now, since link_addr() has no way to indicate an error, these are
only positive tests which check the outcome of valid inputs.

Reviewed by:	ngie, des, adrian
Approved by:	des (mentor)
Differential Revision:	https://reviews.freebsd.org/D50062

(cherry picked from commit 757e973fb2112ea442aa8990d991f406d407b6f7)

link_addr_test: use <cstddef>, not <sys/stddef.h>

<cstddef> is the correct header; this fixes the GCC build.

while here, sort the headers.

Fixes:	757e973fb211 ("libc tests: add tests for link_addr(3) and link_ntoa(3)")
Reviewed by:	des
Approved by:	des (mentor)
Differential Revision:	https://reviews.freebsd.org/D50189

(cherry picked from commit bbffdfef3bf04b2f89027cb20e2019fdc74c4b1b)
2025-07-09 10:05:44 +02:00

45 lines
986 B
Makefile

PACKAGE= tests
ATF_TESTS_C+= ether_test
ATF_TESTS_C+= eui64_aton_test
ATF_TESTS_C+= eui64_ntoa_test
ATF_TESTS_CXX+= link_addr_test
CXXSTD.link_addr_test= c++20
CFLAGS+= -I${.CURDIR}
NETBSD_ATF_TESTS_C+= getprotoent_test
NETBSD_ATF_TESTS_C+= ether_aton_test
SRCS.ether_aton_test= aton_ether_subr.c t_ether_aton.c
# TODO: hostent_test
NETBSD_ATF_TESTS_SH= nsdispatch_test
NETBSD_ATF_TESTS_SH+= protoent_test
NETBSD_ATF_TESTS_SH+= servent_test
BINDIR= ${TESTSDIR}
PROGS= h_nsd_recurse
PROGS+= h_protoent
PROGS+= h_servent
PROGS+= h_dns_server
LIBADD.h_nsd_recurse+= pthread
CLEANFILES+= aton_ether_subr.c
aton_ether_subr.c: gen_ether_subr ${SRCTOP}/sys/net/if_ethersubr.c
${__MAKE_SHELL} ${.ALLSRC} ${.TARGET}
.include "../Makefile.netbsd-tests"
# TODO: the testcases needs to be ported to FreeBSD
#TESTS_SUBDIRS= getaddrinfo
${PACKAGE}FILES+= hosts
${PACKAGE}FILES+= resolv.conf
ATF_TESTS_SH_SED_servent_test= -e 's,services.cdb,services.db,g'
.include <bsd.test.mk>