diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2016-10-10 18:25:27 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2016-10-10 18:25:27 +0000 |
commit | 73d7571f9cbdf12db0826c17341d4ea20bf010a2 (patch) | |
tree | 1c6026251f882aadcd9115271ea0d480c08f87a9 /regress/sys | |
parent | 72874e6a0894546b7c8073aba5717668b0efef3b (diff) |
Move check for sysctl settings from shell script to makefile to
handle skipping consistently like other tests.
Diffstat (limited to 'regress/sys')
-rw-r--r-- | regress/sys/net/etherip/Makefile | 11 | ||||
-rw-r--r-- | regress/sys/net/etherip/etherip_1.sh | 9 |
2 files changed, 11 insertions, 9 deletions
diff --git a/regress/sys/net/etherip/Makefile b/regress/sys/net/etherip/Makefile index 04dc3293f29..f36edc0590a 100644 --- a/regress/sys/net/etherip/Makefile +++ b/regress/sys/net/etherip/Makefile @@ -1,4 +1,13 @@ -# $OpenBSD: Makefile,v 1.1 2016/10/07 02:06:57 yasuoka Exp $ +# $OpenBSD: Makefile,v 1.2 2016/10/10 18:25:26 bluhm Exp $ + +SYSCTL_ETHERIP != sysctl net.inet.etherip.allow + +.if ${SYSCTL_ETHERIP:C/.*=//} != 1 +regress: + @echo "${SYSCTL_ETHERIP}" + @echo set this sysctl to 1 for additional tests + @echo SKIPPED +.endif REGRESS_TARGETS= etherip_1 REGRESS_ROOT_TARGETS= etherip_1 diff --git a/regress/sys/net/etherip/etherip_1.sh b/regress/sys/net/etherip/etherip_1.sh index 3e8bb5335f3..53bc0c2f149 100644 --- a/regress/sys/net/etherip/etherip_1.sh +++ b/regress/sys/net/etherip/etherip_1.sh @@ -1,5 +1,5 @@ #!/bin/ksh -# $OpenBSD: etherip_1.sh,v 1.1 2016/10/07 02:06:57 yasuoka Exp $ +# $OpenBSD: etherip_1.sh,v 1.2 2016/10/10 18:25:26 bluhm Exp $ cleanup() @@ -38,13 +38,6 @@ ALL_IFS="bridge$IFNO2 bridge$IFNO1 vether$IFNO2 vether$IFNO1 etherip$IFNO2 # # Check pre-conditions # -# etherip is enabled by sysctl? -VAL=$(sysctl -n net.inet.etherip.allow) -VAL=${VAL:-0} -if [ $VAL -eq 0 ]; then - echo "SKIPPED Disabled etherip by sysctl net.inet.etherip.allow" >&2 - exit 255 -fi # interfaces are busy? for if in $ALL_IFS; do if iface_exists $if; then |