summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Pfatschbacher <mpf@cvs.openbsd.org>2008-05-08 00:44:58 +0000
committerMarco Pfatschbacher <mpf@cvs.openbsd.org>2008-05-08 00:44:58 +0000
commitf50a59f42ad8eb9c038ce384243069a04d4ae066 (patch)
treed3a46ce0a3837ef4bb78e88de4966f6f56aa1de3
parentcf59c191343557ad8c794732e4924f766e166f22 (diff)
Add/Fix regression tests for sequences of numbers and stacked
assignments of variables. OK deraadt@
-rw-r--r--regress/sbin/pfctl/Makefile4
-rw-r--r--regress/sbin/pfctl/pf96.in5
-rw-r--r--regress/sbin/pfctl/pf96.ok5
-rw-r--r--regress/sbin/pfctl/pfail53.in12
-rw-r--r--regress/sbin/pfctl/pfail53.ok9
5 files changed, 19 insertions, 16 deletions
diff --git a/regress/sbin/pfctl/Makefile b/regress/sbin/pfctl/Makefile
index 602d72349c4..f92d2b6652c 100644
--- a/regress/sbin/pfctl/Makefile
+++ b/regress/sbin/pfctl/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.201 2007/10/14 21:52:14 deraadt Exp $
+# $OpenBSD: Makefile,v 1.202 2008/05/08 00:44:57 mpf Exp $
# TARGETS
# pf: feed pfNN.in through pfctl and check wether the output matches pfNN.ok
@@ -14,7 +14,7 @@
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 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
PFTESTS+=51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
-PFTESTS+=74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
+PFTESTS+=74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96
PFFAIL=1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 23 24 25 27
PFFAIL+=28 29 30 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
PFSIMPLE=1 2
diff --git a/regress/sbin/pfctl/pf96.in b/regress/sbin/pfctl/pf96.in
new file mode 100644
index 00000000000..4d1aed38e5b
--- /dev/null
+++ b/regress/sbin/pfctl/pf96.in
@@ -0,0 +1,5 @@
+# varset allows concatenated strings as numbers
+myports = 5555 6666
+# and also can be used within another macro
+moreports = $myports 7777
+pass in proto tcp from any to any port { $moreports }
diff --git a/regress/sbin/pfctl/pf96.ok b/regress/sbin/pfctl/pf96.ok
new file mode 100644
index 00000000000..e1d9efe31f9
--- /dev/null
+++ b/regress/sbin/pfctl/pf96.ok
@@ -0,0 +1,5 @@
+myports = "5555 6666"
+moreports = "5555 6666 7777"
+pass in proto tcp from any to any port = 5555 flags S/SA keep state
+pass in proto tcp from any to any port = 6666 flags S/SA keep state
+pass in proto tcp from any to any port = 7777 flags S/SA keep state
diff --git a/regress/sbin/pfctl/pfail53.in b/regress/sbin/pfctl/pfail53.in
index 049e68fedce..076154692af 100644
--- a/regress/sbin/pfctl/pfail53.in
+++ b/regress/sbin/pfctl/pfail53.in
@@ -1,23 +1,19 @@
set require-order no
-# varset allows concatenated strings as numbers
-myports = 55 66
-pass in proto tcp from any to any port { $myports }
-
-# queuenames can be numbers
+# queuenames cannot be numbers
altq on lo0 tbrsize 1824 bandwidth 10Mb priq queue 80
queue 80 priority 2 priq(default)
-# tablenames can be numbers
+# tablenames cannot be numbers
table <444> { 1.2.3.4 }
pass in on lo1000000 proto tcp to 10.0.0.1 port 80 flags S/SA modulate state \
(max-src-conn 100, max-src-conn-rate 10/5, overload <444> flush)
-# filename can be a number
+# filename cannot be a number
# XXX not easy to test
#table <filetest> file 666
-# labels, tags, anchors can be numbers
+# labels, tags, anchors cannot be numbers
pass in on lo0 from 1.2.3.4 keep state label 88
pass in on lo0 from 1.2.3.4 keep state tag 57
pass in on lo0 from 1.2.3.4 keep state tagged 57
diff --git a/regress/sbin/pfctl/pfail53.ok b/regress/sbin/pfctl/pfail53.ok
index 2012a135ee9..4f106b21dd1 100644
--- a/regress/sbin/pfctl/pfail53.ok
+++ b/regress/sbin/pfctl/pfail53.ok
@@ -1,9 +1,6 @@
stdin:4: syntax error
-stdin:5: macro 'myports' not defined
-stdin:5: syntax error
-stdin:8: syntax error
-stdin:21: syntax error
-stdin:22: syntax error
-stdin:23: syntax error
+stdin:17: syntax error
+stdin:18: syntax error
+stdin:19: syntax error
set require-order no
table <444> { 1.2.3.4 }