xref: /openbsd/regress/sys/net/pf_table/Makefile (revision 73471bf0)
1#	$OpenBSD: Makefile,v 1.3 2017/07/07 23:15:27 bluhm Exp $
2
3REGRESS_TARGETS=	hit miss cleanup
4CLEANFILES=		stamp-*
5
6stamp-setup:
7	${SUDO} pfctl -qt __regress_tbl -T add -f ${.CURDIR}/table.in
8	date >$@
9
10cleanup:
11	rm -f stamp-setup
12	${SUDO} pfctl -qt __regress_tbl -T kill
13
14hit: stamp-setup
15	for i in `cat ${.CURDIR}/table.hit`; do \
16		echo -n "hit $$i "; \
17		${SUDO} pfctl -qt __regress_tbl -T test $$i || exit 1; \
18		echo success; \
19	done; \
20	exit 0
21
22miss: stamp-setup
23	for i in `cat ${.CURDIR}/table.miss`; do \
24		echo -n "miss $$i "; \
25		${SUDO} pfctl -qt __regress_tbl -T test $$i && exit 1; \
26		echo success; \
27	done; \
28	exit 0
29
30.PHONY: hit miss
31
32.include <bsd.regress.mk>
33