mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 01:30:30 -04:00
parse_ports has been broken ever since7b35b4d, and it's a sufficiently complicated function that it really deserves some unit tests. Fix it, and add tests. Refactor the code a little bit to facilitate unit tests. Chiefly, split the tested functions out of main.c into sockstat.c . PR: 288731 Fixes:7b35b4d("sockstat: add libxo support") Sponsored by: ConnectWise PR: https://github.com/freebsd/freebsd-src/pull/1807 Reviewed by: rido
20 lines
291 B
Makefile
20 lines
291 B
Makefile
.include <src.opts.mk>
|
|
|
|
PROG= sockstat
|
|
SRCS= main.c sockstat.c
|
|
|
|
LIBADD= jail xo
|
|
|
|
.if ${MK_CASPER} != "no"
|
|
LIBADD+= casper
|
|
LIBADD+= cap_net
|
|
LIBADD+= cap_netdb
|
|
LIBADD+= cap_pwd
|
|
LIBADD+= cap_sysctl
|
|
CFLAGS+= -DWITH_CASPER
|
|
.endif
|
|
|
|
HAS_TESTS=
|
|
SUBDIR.${MK_TESTS}+= tests
|
|
|
|
.include <bsd.prog.mk>
|