diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2003-03-11 10:57:12 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2003-03-11 10:57:12 +0000 |
commit | a4dbdbef5e5c1dda1c17cc6eacafe3e3757833b3 (patch) | |
tree | c64fbd9f51760da7e8fd36ee607453c290ab95fb /regress/sbin/pfctl | |
parent | 0aab8f01532d703ede14a9e8c4bc076c9e6d20ac (diff) |
new class of regress tests.
add target "pfaltq".
altq rules are loaded into the kernel and pfctl -gsq output is verified.
opposed to most other regress tests, these ones modify the existing setup,
as altq definitons cannot live in anchors. all queue definitions are flushed
by these tests. Thus, they are not run by default (not part of
REGRESS_TARGETS), but must be run explicitely (make pfaltq).
pfaltq1: very queue id assignment on multiple interfaces with the priq
scheduler
Diffstat (limited to 'regress/sbin/pfctl')
-rw-r--r-- | regress/sbin/pfctl/Makefile | 23 | ||||
-rw-r--r-- | regress/sbin/pfctl/pfaltq1.in | 3 | ||||
-rw-r--r-- | regress/sbin/pfctl/pfaltq1.ok | 8 |
3 files changed, 33 insertions, 1 deletions
diff --git a/regress/sbin/pfctl/Makefile b/regress/sbin/pfctl/Makefile index 3fd81b876b4..3a3960f835b 100644 --- a/regress/sbin/pfctl/Makefile +++ b/regress/sbin/pfctl/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.110 2003/03/10 12:07:01 henning Exp $ +# $OpenBSD: Makefile,v 1.111 2003/03/11 10:57:11 henning Exp $ # TARGETS # pf: feed pfNN.in through pfctl and check wether the output matches pfNN.ok @@ -19,6 +19,7 @@ PFSIMPLE=1 2 PFSETUP=1 2 3 PFLOAD=1 2 3 4 5 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 23 24 25 26 27 28 29 PFLOAD+=30 31 32 34 36 38 39 40 44 46 47 49 54 56 +PFALTQ=1 # disabled; no altq in anchors # PFLOAD+=33 35 37 42 43 45 51 58 59 # disabled; no table def in anchors @@ -175,6 +176,26 @@ REGRESS_TARGETS+=pfsetup UPDATE_TARGETS+=pfsetup-update .endif +.for n in ${PFALTQ} +PFALTQ_TARGETS+=pfaltq${n} +PFALTQ_UPDATES+=pfaltq${n}-update + +pfaltq${n}: + ${SUDO} pfctl -Fq -f - < ${.CURDIR}/pfaltq${n}.in + ${SUDO} pfctl -gsq | \ + diff -u ${.CURDIR}/pfaltq${n}.ok /dev/stdin + ${SUDO} pfctl -Fq >/dev/null 2>&1 + +pfaltq${n}-update: + ${SUDO} pfctl -Fq -f - < ${.CURDIR}/pfaltq${n}.in + ${SUDO} pfctl -gsq > ${.CURDIR}/pfaltq${n}.ok + ${SUDO} pfctl -Fq >/dev/null 2>&1 + +.endfor + +pfaltq: ${PFALTQ_TARGETS} +pfaltq-update: ${PFALTQ_UPDATES} + update: ${UPDATE_TARGETS} .PHONY: ${REGRESS_TARGETS} diff --git a/regress/sbin/pfctl/pfaltq1.in b/regress/sbin/pfctl/pfaltq1.in new file mode 100644 index 00000000000..739d32c0236 --- /dev/null +++ b/regress/sbin/pfctl/pfaltq1.in @@ -0,0 +1,3 @@ +altq on { lo0 tun0 } tbrsize 1824 priq bandwidth 10Mb queue { one two } +queue one priority 1 priq(default) +queue two priority 15 diff --git a/regress/sbin/pfctl/pfaltq1.ok b/regress/sbin/pfctl/pfaltq1.ok new file mode 100644 index 00000000000..f32313eebc8 --- /dev/null +++ b/regress/sbin/pfctl/pfaltq1.ok @@ -0,0 +1,8 @@ +queue one priq( default ) +[ qid=2 ifname=lo0 ifbandwidth=10Mb ] +queue one priq( default ) +[ qid=2 ifname=tun0 ifbandwidth=10Mb ] +queue two priority 15 +[ qid=16 ifname=lo0 ifbandwidth=10Mb ] +queue two priority 15 +[ qid=16 ifname=tun0 ifbandwidth=10Mb ] |