diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2020-01-08 21:28:02 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2020-01-08 21:28:02 +0000 |
commit | 52c7b035d25ecdf490e0281f0944f18d8fb2c174 (patch) | |
tree | a4f620b54272848c3678fbbc095bd4044acd48a8 /regress/sys/net | |
parent | 7d1201a4c5571d2c48ece0cdcebe6f078f3067e4 (diff) |
Rework when tests have to be skipped due to insufficient configuration
of the regress machine.
Diffstat (limited to 'regress/sys/net')
-rw-r--r-- | regress/sys/net/gif/Makefile | 82 | ||||
-rw-r--r-- | regress/sys/net/loop/Makefile | 52 | ||||
-rw-r--r-- | regress/sys/net/pf_forward/Makefile | 23 | ||||
-rw-r--r-- | regress/sys/net/pf_fragment/Makefile | 23 | ||||
-rw-r--r-- | regress/sys/net/pf_state/Makefile | 40 | ||||
-rw-r--r-- | regress/sys/net/pflow/Makefile | 19 |
6 files changed, 156 insertions, 83 deletions
diff --git a/regress/sys/net/gif/Makefile b/regress/sys/net/gif/Makefile index c6ec43c28de..f7c8717be16 100644 --- a/regress/sys/net/gif/Makefile +++ b/regress/sys/net/gif/Makefile @@ -1,6 +1,6 @@ -# $OpenBSD: Makefile,v 1.3 2018/06/25 22:22:49 bluhm Exp $ +# $OpenBSD: Makefile,v 1.4 2020/01/08 21:28:00 bluhm Exp $ -# Copyright (c) 2018 Alexander Bluhm <bluhm@openbsd.org> +# Copyright (c) 2018-2020 Alexander Bluhm <bluhm@openbsd.org> # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above @@ -52,23 +52,38 @@ DST_TUNNEL6_${N2} = ${SRC_TUNNEL6_${N1}} .include <bsd.own.mk> .if ! (make(clean) || make(cleandir) || make(obj)) -SYSCTL_FORWARDING != sysctl net.inet.ip.forwarding +SYSCTL_FORWARDING != sysctl net.inet.ip.forwarding .if ${SYSCTL_FORWARDING:C/.*=//} != 1 regress: - @echo "${SYSCTL_FORWARDING}" - @echo set this sysctl to 1 for additional tests + @echo sysctl: "${SYSCTL_FORWARDING}" + @echo Set sysctl to 1 to run this regress. @echo SKIPPED .endif -PF_SKIP_IFACE != ${SUDO} /sbin/pfctl -sI -v | sed -n 's/ (skip)//p' - -.if ! empty(PF_SKIP_IFACE:Mlo*:Nlo0) +PF_STATUS != ${SUDO} pfctl -si | sed -n 's/^Status: \([^ ]*\) .*/\1/p' +.if empty(PF_STATUS:MEnabled) +regress: + @echo pf status: "${PF_STATUS}" + @echo Enable pf to run this regress. + @echo SKIPPED +.endif +PF_SKIP != ${SUDO} pfctl -sI -v | sed -n 's/ (skip)//p' +.if ! empty(PF_SKIP:Mlo*:Nlo0) regress: - @echo "${PF_SKIP_IFACE}" + @echo pf skip: "${PF_SKIP}" @echo Do not set skip on interface lo, lo${N1}, or lo${N2}. @echo SKIPPED .endif + +PF_ANCHOR != ${SUDO} pfctl -sr | sed -n 's/^anchor "\([^"]*\)" all$$/\1/p' +.if empty(PF_ANCHOR:Mregress) +regress: + @echo pf anchor: "${PF_ANCHOR}" + @echo Need anchor '"regress"' in pf.conf to load additional rules. + @echo SKIPPED +.endif + .endif .PHONY: busy-rdomains ifconfig unconfig @@ -83,41 +98,38 @@ busy-rdomains: ifconfig: unconfig # create and configure loopback interfaces .for n in ${NUMS} - ${SUDO} /sbin/ifconfig lo${n} rdomain ${n} - ${SUDO} /sbin/ifconfig lo${n} inet 127.0.0.1/8 - ${SUDO} /sbin/ifconfig lo${n} inet6 ::1/128 - ${SUDO} /sbin/ifconfig lo${n} inet ${SRC_TUNNEL4_${n}} alias - ${SUDO} /sbin/ifconfig lo${n} inet6 ${SRC_TUNNEL6_${n}} alias - ${SUDO} /sbin/route -n -T ${n} add -inet -host ${DST_TUNNEL4_${n}}\ - 127.0.0.1 - ${SUDO} /sbin/route -n -T ${n} add -inet6 -host ${DST_TUNNEL6_${n}}\ - ::1 - ${SUDO} /sbin/ifconfig gif${n}4 create rdomain ${n} tunneldomain ${n} - ${SUDO} /sbin/ifconfig gif${n}4 tunnel ${SRC_TUNNEL4_${n}}\ - ${DST_TUNNEL4_${n}} - ${SUDO} /sbin/ifconfig gif${n}4 inet ${TUNNEL4_SRC_ADDR4_${n}}/32\ + ${SUDO} ifconfig lo${n} rdomain ${n} + ${SUDO} ifconfig lo${n} inet 127.0.0.1/8 + ${SUDO} ifconfig lo${n} inet6 ::1/128 + ${SUDO} ifconfig lo${n} inet ${SRC_TUNNEL4_${n}} alias + ${SUDO} ifconfig lo${n} inet6 ${SRC_TUNNEL6_${n}} alias + ${SUDO} route -n -T ${n} add -inet -host ${DST_TUNNEL4_${n}} 127.0.0.1 + ${SUDO} route -n -T ${n} add -inet6 -host ${DST_TUNNEL6_${n}} ::1 + ${SUDO} ifconfig gif${n}4 create rdomain ${n} tunneldomain ${n} + ${SUDO} ifconfig gif${n}4 tunnel ${SRC_TUNNEL4_${n}} ${DST_TUNNEL4_${n}} + ${SUDO} ifconfig gif${n}4 inet ${TUNNEL4_SRC_ADDR4_${n}}/32\ ${TUNNEL4_DST_ADDR4_${n}} - ${SUDO} /sbin/ifconfig gif${n}4 inet6 ${TUNNEL4_SRC_ADDR6_${n}}\ + ${SUDO} ifconfig gif${n}4 inet6 ${TUNNEL4_SRC_ADDR6_${n}}\ ${TUNNEL4_DST_ADDR6_${n}} - ${SUDO} /sbin/ifconfig gif${n}6 create rdomain ${n} tunneldomain ${n} - ${SUDO} /sbin/ifconfig gif${n}6 tunnel ${SRC_TUNNEL6_${n}}\ + ${SUDO} ifconfig gif${n}6 create rdomain ${n} tunneldomain ${n} + ${SUDO} ifconfig gif${n}6 tunnel ${SRC_TUNNEL6_${n}}\ ${DST_TUNNEL6_${n}} - ${SUDO} /sbin/ifconfig gif${n}6 inet ${TUNNEL6_SRC_ADDR4_${n}}/32\ + ${SUDO} ifconfig gif${n}6 inet ${TUNNEL6_SRC_ADDR4_${n}}/32\ ${TUNNEL6_DST_ADDR4_${n}} - ${SUDO} /sbin/ifconfig gif${n}6 inet6 ${TUNNEL6_SRC_ADDR6_${n}}\ + ${SUDO} ifconfig gif${n}6 inet6 ${TUNNEL6_SRC_ADDR6_${n}}\ ${TUNNEL6_DST_ADDR6_${n}} .endfor unconfig: # destroy interfaces, keep lo as routing domain cannot be destroyed .for n in ${NUMS} - -${SUDO} /sbin/ifconfig lo${n} rdomain ${n} - -${SUDO} /sbin/ifconfig lo${n} inet 127.0.0.1 delete - -${SUDO} /sbin/ifconfig lo${n} inet6 ::1 delete - -${SUDO} /sbin/ifconfig lo${n} inet ${SRC_TUNNEL4_${n}} delete - -${SUDO} /sbin/ifconfig lo${n} inet6 ${SRC_TUNNEL6_${n}} delete - -${SUDO} /sbin/ifconfig gif${n}4 destroy - -${SUDO} /sbin/ifconfig gif${n}6 destroy + -${SUDO} ifconfig lo${n} rdomain ${n} + -${SUDO} ifconfig lo${n} inet 127.0.0.1 delete + -${SUDO} ifconfig lo${n} inet6 ::1 delete + -${SUDO} ifconfig lo${n} inet ${SRC_TUNNEL4_${n}} delete + -${SUDO} ifconfig lo${n} inet6 ${SRC_TUNNEL6_${n}} delete + -${SUDO} ifconfig gif${n}4 destroy + -${SUDO} ifconfig gif${n}6 destroy .endfor rm -f stamp-setup @@ -143,7 +155,7 @@ addr.py: Makefile stamp-pfctl: addr.py pf.conf stamp-setup @echo '\n======== $@ ========' cat addr.py ${.CURDIR}/pf.conf | /sbin/pfctl -n -f - - cat addr.py ${.CURDIR}/pf.conf | ${SUDO} /sbin/pfctl -a regress -f - + cat addr.py ${.CURDIR}/pf.conf | ${SUDO} pfctl -a regress -f - # ifconfig gif inet6 DAD created tunnel states based on old pf rules ${SUDO} /sbin/pfctl -Fs @date >$@ diff --git a/regress/sys/net/loop/Makefile b/regress/sys/net/loop/Makefile index 2c77490e968..51540d4e83a 100644 --- a/regress/sys/net/loop/Makefile +++ b/regress/sys/net/loop/Makefile @@ -1,6 +1,6 @@ -# $OpenBSD: Makefile,v 1.5 2018/06/25 22:22:49 bluhm Exp $ +# $OpenBSD: Makefile,v 1.6 2020/01/08 21:28:00 bluhm Exp $ -# Copyright (c) 2017 Alexander Bluhm <bluhm@openbsd.org> +# Copyright (c) 2017-2020 Alexander Bluhm <bluhm@openbsd.org> # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above @@ -28,23 +28,39 @@ NUMS = ${N1} ${N2} .include <bsd.own.mk> .if ! (make(clean) || make(cleandir) || make(obj)) -SYSCTL_FORWARDING != sysctl net.inet.ip.forwarding +SYSCTL_FORWARDING != sysctl net.inet.ip.forwarding .if ${SYSCTL_FORWARDING:C/.*=//} != 1 regress: - @echo "${SYSCTL_FORWARDING}" - @echo set this sysctl to 1 for additional tests + @echo sysctl: "${SYSCTL_FORWARDING}" + @echo Set sysctl to 1 to run this regress. @echo SKIPPED .endif -PF_SKIP_IFACE != ${SUDO} /sbin/pfctl -sI -v | sed -n 's/ (skip)//p' +PF_STATUS != ${SUDO} pfctl -si | sed -n 's/^Status: \([^ ]*\) .*/\1/p' +.if empty(PF_STATUS:MEnabled) +regress: + @echo pf status: "${PF_STATUS}" + @echo Enable pf to run this regress. + @echo SKIPPED +.endif -.if ! empty(PF_SKIP_IFACE:Mlo*:Nlo0) +PF_SKIP != ${SUDO} pfctl -sI -v | sed -n 's/ (skip)//p' +.if ! empty(PF_SKIP:Mlo*:Nlo0) regress: - @echo "${PF_SKIP_IFACE}" + @echo pf skip: "${PF_SKIP}" @echo Do not set skip on interface lo, lo${N1}, or lo${N2}. @echo SKIPPED .endif + +PF_ANCHOR != ${SUDO} pfctl -sr | sed -n 's/^anchor "\([^"]*\)" all$$/\1/p' +.if empty(PF_ANCHOR:Mregress) +regress: + @echo pf anchor: "${PF_ANCHOR}" + @echo Need anchor '"regress"' in pf.conf to load additional rules. + @echo SKIPPED +.endif + .endif .PHONY: busy-rdomains ifconfig unconfig @@ -59,20 +75,20 @@ busy-rdomains: ifconfig: unconfig # create and configure loopback interfaces .for n in ${NUMS} - ${SUDO} /sbin/ifconfig lo${n} rdomain ${n} - ${SUDO} /sbin/ifconfig lo${n} inet 127.0.0.1/8 - ${SUDO} /sbin/ifconfig lo${n} inet 127.0.0.${n} alias - ${SUDO} /sbin/route -n -T ${n} add -inet -host 10.6.6.6 127.0.0.1 - ${SUDO} /sbin/route -n -T ${n} add -inet -host 10.7.7.7 127.0.0.1 + ${SUDO} ifconfig lo${n} rdomain ${n} + ${SUDO} ifconfig lo${n} inet 127.0.0.1/8 + ${SUDO} ifconfig lo${n} inet 127.0.0.${n} alias + ${SUDO} route -n -T ${n} add -inet -host 10.6.6.6 127.0.0.1 + ${SUDO} route -n -T ${n} add -inet -host 10.7.7.7 127.0.0.1 .endfor - ${SUDO} /sbin/route -n -T ${N1} add -inet -host 127.0.0.${N2} 127.0.0.1 - ${SUDO} /sbin/route -n -T ${N2} add -inet -host 127.0.0.${N1} 127.0.0.1 + ${SUDO} route -n -T ${N1} add -inet -host 127.0.0.${N2} 127.0.0.1 + ${SUDO} route -n -T ${N2} add -inet -host 127.0.0.${N1} 127.0.0.1 unconfig: # destroy interfaces .for n in ${NUMS} - -${SUDO} /sbin/ifconfig lo${n} 127.0.0.1 delete - -${SUDO} /sbin/ifconfig lo${n} 127.0.0.${n} delete + -${SUDO} ifconfig lo${n} 127.0.0.1 delete + -${SUDO} ifconfig lo${n} 127.0.0.${n} delete .endfor rm -f stamp-setup @@ -95,7 +111,7 @@ addr.py: Makefile stamp-pfctl: addr.py pf.conf stamp-setup @echo '\n======== $@ ========' cat addr.py ${.CURDIR}/pf.conf | /sbin/pfctl -n -f - - cat addr.py ${.CURDIR}/pf.conf | ${SUDO} /sbin/pfctl -a regress -f - + cat addr.py ${.CURDIR}/pf.conf | ${SUDO} pfctl -a regress -f - @date >$@ # run tcpdump on lo devices diff --git a/regress/sys/net/pf_forward/Makefile b/regress/sys/net/pf_forward/Makefile index f193b209b3b..d39ac322378 100644 --- a/regress/sys/net/pf_forward/Makefile +++ b/regress/sys/net/pf_forward/Makefile @@ -1,13 +1,26 @@ -# $OpenBSD: Makefile,v 1.28 2019/05/10 02:22:34 bluhm Exp $ +# $OpenBSD: Makefile,v 1.29 2020/01/08 21:28:00 bluhm Exp $ + +# Copyright (c) 2012-2020 Alexander Bluhm <bluhm@openbsd.org> +# +# Permission to use, copy, modify, and distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. # The following ports must be installed: # -# python-2.7 interpreted object-oriented programming language # scapy powerful interactive packet manipulation in python -.if ! exists(/usr/local/bin/python2.7) || ! exists(/usr/local/bin/scapy) +.if ! exists(/usr/local/bin/scapy) regress: - @echo install python and the scapy module for additional tests + @echo Install scapy package to run this regress. @echo SKIPPED .endif @@ -428,6 +441,8 @@ check-setup-eco: .for ip in ECO_IN ECO_OUT RTT_IN RTT_OUT ssh ${ECO_SSH} netstat -nav -f inet -p udp | fgrep ' ${${ip}}.7 ' ssh ${ECO_SSH} netstat -nav -f inet6 -p udp | fgrep ' ${${ip}6}.7 ' + ssh ${ECO_SSH} sysctl net.inet.ip.forwarding | fgrep =1 + ssh ${ECO_SSH} sysctl net.inet6.ip6.forwarding | fgrep =1 .endfor .include <bsd.regress.mk> diff --git a/regress/sys/net/pf_fragment/Makefile b/regress/sys/net/pf_fragment/Makefile index 1ef491f05f8..0f59aa26bd0 100644 --- a/regress/sys/net/pf_fragment/Makefile +++ b/regress/sys/net/pf_fragment/Makefile @@ -1,13 +1,26 @@ -# $OpenBSD: Makefile,v 1.24 2019/05/10 02:22:34 bluhm Exp $ +# $OpenBSD: Makefile,v 1.25 2020/01/08 21:28:00 bluhm Exp $ + +# Copyright (c) 2011-2020 Alexander Bluhm <bluhm@openbsd.org> +# +# Permission to use, copy, modify, and distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. # The following ports must be installed: # -# python-2.7 interpreted object-oriented programming language # scapy powerful interactive packet manipulation in python -.if ! exists(/usr/local/bin/python2.7) || ! exists(/usr/local/bin/scapy) +.if ! exists(/usr/local/bin/scapy) regress: - @echo install python and the scapy module for additional tests + @echo Install scapy package to run this regress. @echo SKIPPED .endif @@ -416,6 +429,8 @@ check-setup-eco: ssh ${ECO_SSH} ping6 -n -c 1 ${RT_OUT6} # RT_OUT6 .for ip in RT_IN PF_OUT PF_IN SRC_OUT ssh ${ECO_SSH} route -n get -inet6 ${${ip}6} | fgrep -q 'gateway: ${RT_OUT6}' # ${ip}6 RT_OUT6 + ssh ${ECO_SSH} sysctl net.inet.ip.forwarding | fgrep =1 + ssh ${ECO_SSH} sysctl net.inet6.ip6.forwarding | fgrep =1 .endfor .include <bsd.regress.mk> diff --git a/regress/sys/net/pf_state/Makefile b/regress/sys/net/pf_state/Makefile index bae60aa610e..1a44529b0f2 100644 --- a/regress/sys/net/pf_state/Makefile +++ b/regress/sys/net/pf_state/Makefile @@ -1,35 +1,47 @@ -# $OpenBSD: Makefile,v 1.8 2019/05/10 02:22:34 bluhm Exp $ +# $OpenBSD: Makefile,v 1.9 2020/01/08 21:28:01 bluhm Exp $ + +# Copyright (c) 2016-2020 Alexander Bluhm <bluhm@openbsd.org> +# +# Permission to use, copy, modify, and distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. # The following ports must be installed: # -# python-2.7 interpreted object-oriented programming language # scapy powerful interactive packet manipulation in python .include <bsd.own.mk> .if ! (make(clean) || make(cleandir) || make(obj)) -PF_ENABLED !!= ${SUDO} pfctl -si | grep '^Status: Enabled ' || true -PF_ANCHOR !!= ${SUDO} pfctl -sr | grep '^anchor "regress" all$$' || true -.endif -.if ! exists(/usr/local/bin/python2.7) || ! exists(/usr/local/bin/scapy) -.BEGIN: - @true +.if ! exists(/usr/local/bin/scapy) regress: - @echo Install python and the scapy module for additional tests. + @echo Install scapy package to run this regress. @echo SKIPPED .endif -.if ! empty(PF_ENABLED) && empty(PF_ANCHOR) -.BEGIN: - @true +PF_STATUS != ${SUDO} pfctl -si | sed -n 's/^Status: \([^ ]*\) .*/\1/p' +PF_ANCHOR != ${SUDO} pfctl -sr | sed -n 's/^anchor "\([^"]*\)" all$$/\1/p' +.if ! empty(PF_STATUS:MEnabled) && empty(PF_ANCHOR:Mregress) regress: + @echo pf status: "${PF_STATUS}" + @echo pf anchor: "${PF_ANCHOR}" @echo This test cannot run with pf filtering packets on localhost. @echo Either disable pf or add a line 'anchor "regress"' to pf.conf. @echo There the test will add a stateless rule that passes all packets. @echo SKIPPED .endif +.endif + # This test needs a manual setup of two machines # Set up machines: LOCAL REMOTE # LOCAL is the machine where this makefile is running. @@ -88,7 +100,7 @@ stamp-pfctl: addr.py pf.conf cat addr.py ${.CURDIR}/pf.conf | pfctl -n -f - cat addr.py ${.CURDIR}/pf.conf | \ ssh ${REMOTE_SSH} ${SUDO} pfctl -a regress -f - -.if ! empty(PF_ANCHOR) +.if ! empty(PF_ANCHOR:Mregress) echo 'pass on ${LOCAL_IF} no state' | ${SUDO} pfctl -a regress -f - .endif @date >$@ @@ -106,7 +118,7 @@ run-challenge-ack: challenge_ack.py addr.py @echo '\n======== $@ ========' ${SUDO} ${PYTHON}challenge_ack.py -.if ! empty(PF_ANCHOR) +.if ! empty(PF_ANCHOR:Mregress) REGRESS_CLEANUP += cleanup cleanup: @echo '\n======== $@ ========' diff --git a/regress/sys/net/pflow/Makefile b/regress/sys/net/pflow/Makefile index 122fe9b13e9..f71552cc5ab 100644 --- a/regress/sys/net/pflow/Makefile +++ b/regress/sys/net/pflow/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.7 2017/03/03 21:34:14 bluhm Exp $ +# $OpenBSD: Makefile,v 1.8 2020/01/08 21:28:01 bluhm Exp $ # # template_v10 # ---------------- @@ -28,19 +28,20 @@ REGRESS_TARGETS=template_v10 flow_10_4 flow_10_6 ifconfig -PROG= gen_traffic -LDADD= -levent +PROG= gen_traffic +LDADD= -levent .if ! (make(clean) || make(cleandir) || make(obj)) -PF_ENABLED !!= pfctl -si | grep '^Status: Enabled ' || true -.endif -.if empty(PF_ENABLED) + +PF_STATUS != ${SUDO} pfctl -si | sed -n 's/^Status: \([^ ]*\) .*/\1/p' +.if empty(PF_STATUS:MEnabled) regress: - @echo Enable pf on localhost to run pflow test. + @echo pf status: "${PF_STATUS}" + @echo Enable pf to run this regress. @echo SKIPPED .endif -PERL_REQUIRE !!= perl -e 'eval { require Net::Flow } or print $@' +PERL_REQUIRE != perl -e 'eval { require Net::Flow } or print $@' .if ! empty(PERL_REQUIRE) regress: @echo "${PERL_REQUIRE}" @@ -48,6 +49,8 @@ regress: @echo SKIPPED .endif +.endif + template_v10: perl ${.CURDIR}/template.pl 10 \ | diff -up ${.CURDIR}/template.v10 /dev/stdin |