diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2014-05-31 14:15:54 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2014-05-31 14:15:54 +0000 |
commit | 97a9a3238f7aba08b4fe7b96d8c1481d3c620294 (patch) | |
tree | f8da5855336ad8ac637c4e7683dedecd3d91c19a /regress/sbin/route | |
parent | dbd80987e01888c0e427304292c8d7046fc73a70 (diff) |
Add a basic test for RTM_CHANGE
Diffstat (limited to 'regress/sbin/route')
-rw-r--r-- | regress/sbin/route/Makefile | 17 | ||||
-rw-r--r-- | regress/sbin/route/rttest12.ok | 9 |
2 files changed, 25 insertions, 1 deletions
diff --git a/regress/sbin/route/Makefile b/regress/sbin/route/Makefile index 1c6a2f89552..2d8cbf869d8 100644 --- a/regress/sbin/route/Makefile +++ b/regress/sbin/route/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.3 2014/04/18 16:38:28 claudio Exp $ +# $OpenBSD: Makefile,v 1.4 2014/05/31 14:15:53 claudio Exp $ RDOMAIN?= 5 @@ -156,6 +156,21 @@ rttest${n}: ${RCMD} show -inet 2>&1 | \ diff -u ${.CURDIR}/${.TARGET}.ok /dev/stdin +n= 12 +RTTEST_TARGETS+:=rttest${n} +rttest${n}: + ${RCMD} add -mpath 10.8.1/24 192.0.2.3 + ${RCMD} change -mpath 10.8.1/24 192.0.2.4 + ${RCMD} show -inet 2>&1 | \ + diff -u ${.CURDIR}/${.TARGET}.ok /dev/stdin + +n= 13 +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.5 && exit 1 || exit 0 + REGRESS_TARGETS=netmask ${RTTEST_TARGETS} REGRESS_ROOT_TARGETS=${REGRESS_TARGETS} .PHONY: ${REGRESS_TARGETS} diff --git a/regress/sbin/route/rttest12.ok b/regress/sbin/route/rttest12.ok new file mode 100644 index 00000000000..ec3999cb19f --- /dev/null +++ b/regress/sbin/route/rttest12.ok @@ -0,0 +1,9 @@ +Routing tables + +Internet: +Destination Gateway Flags Refs Use Mtu Prio Iface +10.8.1/24 192.0.2.4 UGS 0 0 32768 8 lo10004 +192.0.2.1 192.0.2.1 UH 0 0 32768 4 lo10001 +192.0.2.2 192.0.2.2 UH 0 0 32768 4 lo10002 +192.0.2.3 192.0.2.3 UH 0 0 32768 4 lo10003 +192.0.2.4 192.0.2.4 UH 1 0 32768 4 lo10004 |