Lines Matching +full:pass +full:- +full:1

2 # SPDX-License-Identifier: BSD-2-Clause
9 # 1. Redistributions of source code must retain the above copyright
30 TABLE_STATS_NONZERO_REGEXP='Packets: [1-9][0-9]*[[:space:]]*Bytes: [1-9][0-9]*[[:space:]]'
35 atf_set descr 'Verify per-address counters for v4'
48 jexec alcatraz pfctl -e
53 "pass in from <foo> to any" \
54 "pass out from any to <foo>" \
57 atf_check -s exit:0 -o ignore ping -c 3 192.0.2.2
59 atf_check -s exit:0 -e ignore \
60 -o match:'In/Block:.*'"$TABLE_STATS_ZERO_REGEXP" \
61 -o match:'In/Pass:.*'"$TABLE_STATS_NONZERO_REGEXP" \
62 -o match:'Out/Block:.*'"$TABLE_STATS_ZERO_REGEXP" \
63 -o match:'Out/Pass:.*'"$TABLE_STATS_NONZERO_REGEXP" \
64 jexec alcatraz pfctl -t foo -T show -vv
75 atf_set descr 'Verify per-address counters for v6'
84 ifconfig ${epair_send}a inet6 2001:db8:42::1/64 up no_dad -ifdisabled
88 jexec alcatraz pfctl -e
91 "table <foo6> counters { 2001:db8:42::1 }" \
93 "pass in from <foo6> to any" \
94 "pass out from any to <foo6>" \
97 atf_check -s exit:0 -o ignore ping -6 -c 3 2001:db8:42::2
99 atf_check -s exit:0 -e ignore \
100 -o match:'In/Block:.*'"$TABLE_STATS_ZERO_REGEXP" \
101 -o match:'In/Pass:.*'"$TABLE_STATS_NONZERO_REGEXP" \
102 -o match:'Out/Block:.*'"$TABLE_STATS_ZERO_REGEXP" \
103 -o match:'Out/Pass:.*'"$TABLE_STATS_NONZERO_REGEXP" \
104 jexec alcatraz pfctl -t foo6 -T show -vv
127 jexec alcatraz pfctl -e
132 "pass in from <foo> to any" \
133 "pass out from any to <foo>" \
136 atf_check -s exit:0 -o ignore ping -c 3 -S 192.0.2.1 192.0.2.2
137 atf_check -s exit:0 -o ignore ping -c 3 -S 192.0.2.3 192.0.2.2
139 jexec alcatraz pfctl -t foo -T show -vv
141 atf_check -s exit:0 -e ignore \
142 -o match:'In/Block:.*'"$TABLE_STATS_ZERO_REGEXP" \
143 -o match:'In/Pass:.*'"$TABLE_STATS_NONZERO_REGEXP" \
144 -o match:'Out/Block:.*'"$TABLE_STATS_ZERO_REGEXP" \
145 -o match:'Out/Pass:.*'"$TABLE_STATS_NONZERO_REGEXP" \
146 jexec alcatraz pfctl -t foo -T show -vv
148 atf_check -s exit:0 -e ignore \
149 jexec alcatraz pfctl -t foo -T zero 192.0.2.3
151 # We now have a zeroed and a non-zeroed counter, so both patterns
153 atf_check -s exit:0 -e ignore \
154 -o match:'In/Pass:.*'"$TABLE_STATS_NONZERO_REGEXP" \
155 -o match:'Out/Pass:.*'"$TABLE_STATS_NONZERO_REGEXP" \
156 jexec alcatraz pfctl -t foo -T show -vv
157 atf_check -s exit:0 -e ignore \
158 -o match:'In/Pass:.*'"$TABLE_STATS_ZERO_REGEXP" \
159 -o match:'Out/Pass:.*'"$TABLE_STATS_ZERO_REGEXP" \
160 jexec alcatraz pfctl -t foo -T show -vv
171 atf_set descr 'Test zeroing an address with non-zero counters'
183 jexec alcatraz pfctl -e
189 "pass in from <foo> to any" \
190 "pass out from any to <foo>" \
191 "pass on notReallyAnIf from <bar> to <bar>" \
194 # Nonexisting table can't be reset, following `-T show`.
195 atf_check -o ignore \
196 -s not-exit:0 \
197 -e inline:"pfctl: Table does not exist.\n" \
198 jexec alcatraz pfctl -t nonexistent -T reset
200 atf_check -o ignore \
201 -s exit:0 \
202 -e inline:"0/0 stats cleared.\n" \
203 jexec alcatraz pfctl -t bar -T reset
205 # No-op is a valid operation.
206 atf_check -s exit:0 \
207 -e inline:"0/2 stats cleared.\n" \
208 jexec alcatraz pfctl -t foo -T reset
210 atf_check -s exit:0 -o ignore ping -c 3 -S 192.0.2.3 192.0.2.2
212 atf_check -s exit:0 -e ignore \
213 -o match:'In/Pass:.*'"$TABLE_STATS_ZERO_REGEXP" \
214 -o match:'In/Pass:.*'"$TABLE_STATS_NONZERO_REGEXP" \
215 -o match:'Out/Pass:.*'"$TABLE_STATS_ZERO_REGEXP" \
216 -o match:'Out/Pass:.*'"$TABLE_STATS_NONZERO_REGEXP" \
217 jexec alcatraz pfctl -t foo -vvT show
220 clrd=`jexec alcatraz pfctl -t foo -vvT show | grep -c Cleared`
221 uniq=`jexec alcatraz pfctl -t foo -vvT show | sort -u | grep -c Cleared`
223 atf_check_equal "$uniq" 1 # time they were added
225 atf_check -s exit:0 -e ignore \
226 -e inline:"1/2 stats cleared.\n" \
227 jexec alcatraz pfctl -t foo -T reset
229 clrd=`jexec alcatraz pfctl -t foo -vvT show | grep -c Cleared`
230 uniq=`jexec alcatraz pfctl -t foo -vvT show | sort -u | grep -c Cleared`
234 atf_check -s exit:0 -e ignore \
235 -o not-match:'In/Pass:.*'"$TABLE_STATS_NONZERO_REGEXP" \
236 -o not-match:'Out/Pass:.*'"$TABLE_STATS_NONZERO_REGEXP" \
237 -o match:'In/Pass:.*'"$TABLE_STATS_ZERO_REGEXP" \
238 -o match:'Out/Pass:.*'"$TABLE_STATS_ZERO_REGEXP" \
239 jexec alcatraz pfctl -t foo -vvT show
263 jexec alcatraz pfctl -e
266 "pass all" \
268 "pass in log to <tab>"
271 "pass all" \
273 "pass in log to <tab>"
275 atf_check -s exit:0 -o ignore ping -c 3 192.0.2.2
277 jexec alcatraz pfctl -t tab -T show -vv
288 atf_set descr "Test automatic - optimizer generated - tables"
301 jexec alcatraz pfctl -e
305 "pass in proto icmp from 192.0.2.1" \
306 "pass in proto icmp from 192.0.2.3" \
307 "pass in proto icmp from 192.0.2.4" \
308 "pass in proto icmp from 192.0.2.5" \
309 "pass in proto icmp from 192.0.2.6" \
310 "pass in proto icmp from 192.0.2.7" \
311 "pass in proto icmp from 192.0.2.8" \
312 "pass in proto icmp from 192.0.2.9"
314 atf_check -s exit:0 -o ignore ping -c 1 192.0.2.2
338 jexec alcatraz pfctl -e
343 "pass in from <allow>"
345 atf_check -s exit:0 -o ignore ping -c 1 192.0.2.2
365 jexec alcatraz pfctl -e
368 "pass in" \
371 atf_check -o match:'block drop in inet from <__automatic_.*:6> to any' \
372 -e ignore \
373 jexec alcatraz pfctl -sr -vv
394 jexec alcatraz pfctl -t foo -T add 192.0.2.1
395 jexec alcatraz pfctl -t foo -T show
399 "pass in from <foo>"
402 atf_check -s exit:0 -e ignore \
403 -o match:'In/Block:.*'"$TABLE_STATS_ZERO_REGEXP" \
404 -o match:'In/Pass:.*'"$TABLE_STATS_ZERO_REGEXP" \
405 -o match:'Out/Block:.*'"$TABLE_STATS_ZERO_REGEXP" \
406 -o match:'Out/Pass:.*'"$TABLE_STATS_ZERO_REGEXP" \
407 jexec alcatraz pfctl -t foo -T show -vv
432 jexec alcatraz pfctl -e
436 ) | jexec alcatraz pfctl -a anchorage -f -
439 "pass" \
442 atf_check -s exit:0 -o ignore ping -c 1 192.0.2.2
445 jexec alcatraz pfctl -t testtable -T add 192.0.2.1
446 atf_check -s exit:0 -o ignore ping -c 1 192.0.2.2
449 jexec alcatraz pfctl -a anchorage -t testtable -T add 192.0.2.1
450 atf_check -s exit:2 -o ignore ping -c 1 192.0.2.2