summaryrefslogtreecommitdiff
path: root/regress/sbin
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2002-11-25 18:27:52 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2002-11-25 18:27:52 +0000
commit63655e1169a0b5bdf4836871bb432bd5152b9aa4 (patch)
tree2bc24e7161a59fbd1e212be15a74eaaa98580aac /regress/sbin
parentef964c6009a7e784f13089816b0bf37782e4d5c8 (diff)
create a new set of regress tests, which require an active
setup/cleanup of interfaces/protocols/etc. this is not ran by default and requires a DO_PFSETUP make variable set to be activated, one has to run as root as well. add one simple test for the proper loN link1 address expansion. henning@ ok
Diffstat (limited to 'regress/sbin')
-rw-r--r--regress/sbin/pfctl/Makefile16
-rw-r--r--regress/sbin/pfctl/pfsetup1.clean1
-rw-r--r--regress/sbin/pfctl/pfsetup1.in1
-rw-r--r--regress/sbin/pfctl/pfsetup1.ok1
-rw-r--r--regress/sbin/pfctl/pfsetup1.setup1
5 files changed, 19 insertions, 1 deletions
diff --git a/regress/sbin/pfctl/Makefile b/regress/sbin/pfctl/Makefile
index acade49f23d..22f78edb997 100644
--- a/regress/sbin/pfctl/Makefile
+++ b/regress/sbin/pfctl/Makefile
@@ -1,9 +1,10 @@
-# $OpenBSD: Makefile,v 1.42 2002/11/25 16:16:07 henning Exp $
+# $OpenBSD: Makefile,v 1.43 2002/11/25 18:27:51 mickey Exp $
PFTESTS=1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
PFTESTS+=28 29 30 31 32 33 34
PFFAIL=1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
PFSIMPLE=1 2
+PFSETUP=1
.for n in ${PFFAIL}
REGRESS_TARGETS+=pfail${n}
@@ -45,6 +46,19 @@ pfsimple${n}:
.endfor
+.ifdef DO_PFSETUP
+.for n in ${PFSETUP}
+REGRESS_TARGETS+=pfsetup${n}
+
+pfsetup${n}:
+ ${SHELL} ${.CURDIR}/pfsetup${n}.setup
+ pfctl -nv -f - < ${.CURDIR}/pfsetup${n}.in | \
+ diff -u ${.CURDIR}/pfsetup${n}.ok /dev/stdin
+ ${SHELL} ${.CURDIR}/pfsetup${n}.clean
+
+.endfor
+.endif
+
.PHONY: ${REGRESS_TARGETS}
.include <bsd.regress.mk>
diff --git a/regress/sbin/pfctl/pfsetup1.clean b/regress/sbin/pfctl/pfsetup1.clean
new file mode 100644
index 00000000000..4f3daea01e2
--- /dev/null
+++ b/regress/sbin/pfctl/pfsetup1.clean
@@ -0,0 +1 @@
+ifconfig lo1 inet 192.168.0.1 netmask 0xffffff00 delete
diff --git a/regress/sbin/pfctl/pfsetup1.in b/regress/sbin/pfctl/pfsetup1.in
new file mode 100644
index 00000000000..4628fca7853
--- /dev/null
+++ b/regress/sbin/pfctl/pfsetup1.in
@@ -0,0 +1 @@
+pass in from any to lo1
diff --git a/regress/sbin/pfctl/pfsetup1.ok b/regress/sbin/pfctl/pfsetup1.ok
new file mode 100644
index 00000000000..cc1cc18c004
--- /dev/null
+++ b/regress/sbin/pfctl/pfsetup1.ok
@@ -0,0 +1 @@
+@0 pass in inet from any to 192.168.0.1/24
diff --git a/regress/sbin/pfctl/pfsetup1.setup b/regress/sbin/pfctl/pfsetup1.setup
new file mode 100644
index 00000000000..8dd2dae4099
--- /dev/null
+++ b/regress/sbin/pfctl/pfsetup1.setup
@@ -0,0 +1 @@
+ifconfig lo1 inet 192.168.0.1 netmask 0xffffff00 link1