diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2017-08-10 13:08:40 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2017-08-10 13:08:40 +0000 |
commit | 5af6c9dd3e263cb1aaa6f810ce4fbb8ba3b83bda (patch) | |
tree | d626515d3413f00daf7c20c5b4799be2cbb68f7e /regress/sbin/route | |
parent | 641d5868928db5fb9f114567eed9ffb8cfe0d225 (diff) |
Use "! cmd" for commands that are expected to fail.
Suggested by bluhm@
Diffstat (limited to 'regress/sbin/route')
-rw-r--r-- | regress/sbin/route/Makefile | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/regress/sbin/route/Makefile b/regress/sbin/route/Makefile index 580c2c2aafa..31576c2d8de 100644 --- a/regress/sbin/route/Makefile +++ b/regress/sbin/route/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.18 2017/08/10 13:06:12 mpi Exp $ +# $OpenBSD: Makefile,v 1.19 2017/08/10 13:08:39 mpi Exp $ RDOMAIN?= 5 @@ -85,7 +85,7 @@ rttest${n}: ${RCMD} add -mpath -priority 16 10.8.1/24 192.0.2.2 ${RCMD} add -mpath -priority 17 10.8.1/24 192.0.2.2 ${RCMD} add -mpath -priority 18 10.8.1/24 192.0.2.2 - ${RCMD} add -mpath -priority 17 10.8.1/24 192.0.2.2 && exit 1 || exit 0 + ! ${RCMD} add -mpath -priority 17 10.8.1/24 192.0.2.2 ${RCMD} show -inet 2>&1 | \ diff -u ${.CURDIR}/${.TARGET}.ok /dev/stdin @@ -96,7 +96,7 @@ rttest${n}: ${RCMD} add -priority 16 10.8.1/24 192.0.2.1 ${RCMD} add -priority 17 10.8.1/24 192.0.2.2 ${RCMD} add -priority 18 10.8.1/24 192.0.2.3 - ${RCMD} add -priority 17 10.8.1/24 192.0.2.2 && exit 1 || exit 0 + ! ${RCMD} add -priority 17 10.8.1/24 192.0.2.2 ${RCMD} show -inet 2>&1 | \ diff -u ${.CURDIR}/${.TARGET}.ok /dev/stdin @@ -119,7 +119,7 @@ rttest${n}: ${RCMD} add -priority 17 10.8.1/24 192.0.2.2 ${RCMD} add -priority 18 10.8.1/24 192.0.2.3 ${SUDO} ifconfig lo10002 down - ${RCMD} add -priority 17 10.8.1/24 192.0.2.2 && exit 1 || exit 0 + ! ${RCMD} add -priority 17 10.8.1/24 192.0.2.2 @# Work around a race that mess up the route reference counts @sleep .1 ${RCMD} show -inet 2>&1 | \ @@ -174,7 +174,7 @@ RTTEST_TARGETS+:=rttest${n} rttest${n}: ${RCMD} add -mpath 10.8.1/24 192.0.2.3 ${RCMD} add -mpath 10.8.1/24 192.0.2.4 - ${RCMD} change -mpath 10.8.1/24 192.0.2.1 && exit 1 || exit 0 + ! ${RCMD} change -mpath 10.8.1/24 192.0.2.1 # Changing MTU should not change the ifa n= 14 @@ -278,7 +278,7 @@ RTTEST_TARGETS+:=rttest${n} rttest${n}: ${RCMD} add -mpath 10.8.1/24 192.0.2.3 ${RCMD} add -mpath 10.8.1/24 192.0.2.4 - ${RCMD} change -mpath -mtu 1000 10.8.1/24 && exit 1 || exit 0 + ! ${RCMD} change -mpath -mtu 1000 10.8.1/24 # Can change and lock the MTU of an mpath route that exists # (route can't just lock so this is mostly the same as rttest22) @@ -297,7 +297,7 @@ RTTEST_TARGETS+:=rttest${n} rttest${n}: ${RCMD} add -mpath 10.8.1/24 192.0.2.3 ${RCMD} add -mpath 10.8.1/24 192.0.2.4 - ${RCMD} change -mpath -mtu 1000 10.8.1/24 192.0.2.1 && exit 1 || exit 0 + ! ${RCMD} change -mpath -mtu 1000 10.8.1/24 192.0.2.1 # Can change the MTU of an non-mpath route without gateway n= 26 @@ -321,13 +321,13 @@ rttest${n}: n= 28 RTTEST_TARGETS+:=rttest${n} rttest${n}: - ${RCMD} delete 192.0.2.1 192.0.2.1 && exit 1 || exit 0 + ! ${RCMD} delete 192.0.2.1 192.0.2.1 # Can't change/set expire on a RTF_LOCAL route n= 29 RTTEST_TARGETS+:=rttest${n} rttest${n}: - ${RCMD} change -expire 30 192.0.2.1 192.0.2.2 && exit 1 || exit 0 + ! ${RCMD} change -expire 30 192.0.2.1 192.0.2.2 REGRESS_TARGETS=netmask ${RTTEST_TARGETS} REGRESS_ROOT_TARGETS=${REGRESS_TARGETS} |