diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2016-08-31 22:44:30 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2016-08-31 22:44:30 +0000 |
commit | f7f47608e087682199036d8f798bbdd9d7a9e2c0 (patch) | |
tree | 303e74f2d2ed473c2de4fe11d27ea0b92b7bf656 /regress | |
parent | 1ab3a091ce18d8ade2d2178da253dcf8b30fafca (diff) |
Split the check-setup target into smaller parts to make it easier
to configure the regression test machines.
Diffstat (limited to 'regress')
-rw-r--r-- | regress/sys/net/pf_forward/Makefile | 20 | ||||
-rw-r--r-- | regress/sys/net/pf_fragment/Makefile | 20 | ||||
-rw-r--r-- | regress/sys/netinet6/rh0/Makefile | 13 |
3 files changed, 35 insertions, 18 deletions
diff --git a/regress/sys/net/pf_forward/Makefile b/regress/sys/net/pf_forward/Makefile index 7e938752d72..b76843ef547 100644 --- a/regress/sys/net/pf_forward/Makefile +++ b/regress/sys/net/pf_forward/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.14 2015/11/01 21:30:00 bluhm Exp $ +# $OpenBSD: Makefile,v 1.15 2016/08/31 22:44:29 bluhm Exp $ # The following ports must be installed: # @@ -280,8 +280,10 @@ CLEANFILES += addr.py *.pyc *.log stamp-* .PHONY: check-setup # Check wether the address, route and remote setup is correct -check-setup: - @echo '\n======== $@ SRC ========' +check-setup: check-setup-src check-setup-pf check-setup-rt check-setup-eco + +check-setup-src: + @echo '\n======== $@ ========' .for ip in SRC_OUT RPT_OUT ping -n -c 1 ${${ip}} # ${ip} route -n get -inet ${${ip}} | grep -q 'flags: .*LOCAL' # ${ip} @@ -300,7 +302,9 @@ check-setup: .for ip in PF_OUT RT_IN RT_OUT ECO_IN ECO_OUT RDR_IN RDR_OUT AF_IN RTT_IN route -n get -inet6 ${${ip}6} | fgrep -q 'gateway: ${PF_IN6}' # ${ip}6 PF_IN6 .endfor - @echo '\n======== $@ PF ========' + +check-setup-pf: + @echo '\n======== $@ ========' ssh ${PF_SSH} ping -n -c 1 ${PF_IN} # PF_IN ssh ${PF_SSH} route -n get -inet ${PF_IN} | grep -q 'flags: .*LOCAL' # PF_IN ssh ${PF_SSH} ping -n -c 1 ${SRC_OUT} # SRC_OUT @@ -330,7 +334,9 @@ check-setup: ssh ${PF_SSH} sysctl net.inet.ip.forwarding | fgrep =1 ssh ${PF_SSH} sysctl net.inet6.ip6.forwarding | fgrep =1 ssh ${PF_SSH} ifconfig ${PF_IFOUT} | fgrep 'mtu 1400' - @echo '\n======== $@ RT ========' + +check-setup-rt: + @echo '\n======== $@ ========' ssh ${RT_SSH} ping -n -c 1 ${RT_IN} # RT_IN ssh ${RT_SSH} route -n get -inet ${RT_IN} | grep -q 'flags: .*LOCAL' # RT_IN ssh ${RT_SSH} ping -n -c 1 ${PF_OUT} # PF_OUT @@ -358,7 +364,9 @@ check-setup: ssh ${RT_SSH} sysctl net.inet.ip.forwarding | fgrep =1 ssh ${RT_SSH} sysctl net.inet6.ip6.forwarding | fgrep =1 ssh ${RT_SSH} ifconfig | fgrep 'mtu 1300' - @echo '\n======== $@ ECO ========' + +check-setup-eco: + @echo '\n======== $@ ========' .for ip in ECO_IN ECO_OUT RTT_IN ssh ${ECO_SSH} ping -n -c 1 ${${ip}} # ${ip} ssh ${ECO_SSH} route -n get -inet ${${ip}} | grep -q 'flags: .*LOCAL' # ${ip} diff --git a/regress/sys/net/pf_fragment/Makefile b/regress/sys/net/pf_fragment/Makefile index 3a10596cf02..a3a45cc4da6 100644 --- a/regress/sys/net/pf_fragment/Makefile +++ b/regress/sys/net/pf_fragment/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.19 2016/05/28 19:54:26 sthen Exp $ +# $OpenBSD: Makefile,v 1.20 2016/08/31 22:44:29 bluhm Exp $ # The following ports must be installed: # @@ -318,8 +318,10 @@ CLEANFILES += addr.py *.pyc *.log stamp-* .PHONY: check-setup # Check whether the address, route and remote setup are correct -check-setup: - @echo '\n======== $@ SRC ========' +check-setup: check-setup-src check-setup-pf check-setup-rt check-setup-eco + +check-setup-src: + @echo '\n======== $@ ========' .for ip in SRC_OUT ping -n -c 1 ${${ip}} # ${ip} route -n get -inet ${${ip}} | grep -q 'flags: .*LOCAL' # ${ip} @@ -338,7 +340,9 @@ check-setup: .for ip in PF_OUT RT_IN RT_OUT ECO_IN RDR_IN RTT_IN route -n get -inet6 ${${ip}6} | fgrep -q 'gateway: ${PF_IN6}' # ${ip}6 PF_IN6 .endfor - @echo '\n======== $@ PF ========' + +check-setup-pf: + @echo '\n======== $@ ========' ssh ${PF_SSH} ping -n -c 1 ${PF_IN} # PF_IN ssh ${PF_SSH} route -n get -inet ${PF_IN} | grep -q 'flags: .*LOCAL' # PF_IN ssh ${PF_SSH} ping -n -c 1 ${SRC_OUT} # SRC_OUT @@ -367,7 +371,9 @@ check-setup: ssh ${PF_SSH} ${SUDO} pfctl -si | grep '^Status: Enabled ' ssh ${PF_SSH} sysctl net.inet.ip.forwarding | fgrep =1 ssh ${PF_SSH} sysctl net.inet6.ip6.forwarding | fgrep =1 - @echo '\n======== $@ RT ========' + +check-setup-rt: + @echo '\n======== $@ ========' ssh ${RT_SSH} ping -n -c 1 ${RT_IN} # RT_IN ssh ${RT_SSH} route -n get -inet ${RT_IN} | grep -q 'flags: .*LOCAL' # RT_IN ssh ${RT_SSH} ping -n -c 1 ${PF_OUT} # PF_OUT @@ -395,7 +401,9 @@ check-setup: ssh ${RT_SSH} sysctl net.inet.ip.forwarding | fgrep =1 ssh ${RT_SSH} sysctl net.inet6.ip6.forwarding | fgrep =1 ssh ${RT_SSH} ifconfig | fgrep 'mtu 1300' - @echo '\n======== $@ ECO ========' + +check-setup-eco: + @echo '\n======== $@ ========' .for ip in ECO_IN RTT_IN ssh ${ECO_SSH} ping -n -c 1 ${${ip}} # ${ip} ssh ${ECO_SSH} route -n get -inet ${${ip}} | grep -q 'flags: .*LOCAL' # ${ip} diff --git a/regress/sys/netinet6/rh0/Makefile b/regress/sys/netinet6/rh0/Makefile index b5bfc26faf2..210fc035fa2 100644 --- a/regress/sys/netinet6/rh0/Makefile +++ b/regress/sys/netinet6/rh0/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.4 2013/11/17 20:16:27 bluhm Exp $ +# $OpenBSD: Makefile,v 1.5 2016/08/31 22:44:29 bluhm Exp $ # The following ports must be installed: # @@ -135,14 +135,15 @@ CLEANFILES += addr.py *.pyc *.log # Check wether the address, route and remote setup is correct check-setup: - route -n get -inet6 ${SRC_OUT6} | grep 'interface: lo0$$' + @echo '\n======== $@ ========' + route -n get -inet6 ${SRC_OUT6} | grep -q 'flags: .*LOCAL' ping6 -n -c 1 ${SRC_OUT6} - route -n get -inet6 ${DST_IN6} | grep 'interface: ${SRC_IF}$$' + route -n get -inet6 ${DST_IN6} | grep -q 'interface: ${SRC_IF}$$' ping6 -n -c 1 ${DST_IN6} - route -n get -inet6 ${DST_OUT6} | grep 'gateway: ${DST_IN6}$$' + route -n get -inet6 ${DST_OUT6} | grep -q 'gateway: ${DST_IN6}$$' ping6 -n -c 1 ${DST_OUT6} - route -n get -inet6 ${SRT_IN6} | grep 'gateway: ${DST_IN6}$$' - ndp -n ${DST_IN6} | grep ' ${DST_MAC} ' + route -n get -inet6 ${SRT_IN6} | grep -q 'gateway: ${DST_IN6}$$' + ndp -n ${DST_IN6} | grep -q ' ${DST_MAC} ' .if defined(REMOTE_SSH) ssh ${REMOTE_SSH} ${SUDO} pfctl -si | grep '^Status: Disabled ' .endif |