diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2016-11-14 10:07:03 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2016-11-14 10:07:03 +0000 |
commit | 96d69f82f8951fa7a8016191cc8d3f8316b21658 (patch) | |
tree | d7d5750765c25649105b13bc4a85cca96e3ef102 /regress/sys/net | |
parent | 8cf85cdefa1f8ae6fb31a973f81a7ff5a04e0adf (diff) |
Regression test for creating a rdomain default loopback interface.
Even if a lo(4) interface will now be created for every rdomain, we
must ensure that condiguring such interface via netstart(8) still
work, for example:
$ cat /etc/hostname.lo1
rdomain 1
127.0.0.1
inet6 ::1/128
alias 88.76.0.3/32
Diffstat (limited to 'regress/sys/net')
-rw-r--r-- | regress/sys/net/rdomains/Makefile | 17 | ||||
-rw-r--r-- | regress/sys/net/rdomains/lo.ok | 1 |
2 files changed, 13 insertions, 5 deletions
diff --git a/regress/sys/net/rdomains/Makefile b/regress/sys/net/rdomains/Makefile index f5336d3b674..9f4956d8d39 100644 --- a/regress/sys/net/rdomains/Makefile +++ b/regress/sys/net/rdomains/Makefile @@ -1,11 +1,18 @@ -# $OpenBSD: Makefile,v 1.1 2015/10/26 08:04:10 vgross Exp $ +# $OpenBSD: Makefile,v 1.2 2016/11/14 10:07:02 mpi Exp $ -DIR= ${.CURDIR}/../../net/rdomains +RDOMAIN?= 5 -REGRESS_TARGETS= run-regress-ifalocal +REGRESS_TARGETS= create-default-loopback regress-ifalocal REGRESS_ROOT_TARGETS= $(REGRESS_TARGETS) -run-regress-ifalocal: - sh $(DIR)/ifalocal.sh +# Ensure that one can create the default loopback of a rdomain +create-default-loopback: + ${SUDO} ifconfig lo${RDOMAIN} rdomain ${RDOMAIN} up + ifconfig lo${RDOMAIN} 2>&1 | head -n1 | sed 's,${RDOMAIN},RDO,g' | \ + diff -u ${.CURDIR}/lo.ok /dev/stdin + +regress-ifalocal: + ${SUDO} sh ${.CURDIR}/ifalocal.sh + .include <bsd.regress.mk> diff --git a/regress/sys/net/rdomains/lo.ok b/regress/sys/net/rdomains/lo.ok new file mode 100644 index 00000000000..5b5911224aa --- /dev/null +++ b/regress/sys/net/rdomains/lo.ok @@ -0,0 +1 @@ +loRDO: flags=8009<UP,LOOPBACK,MULTICAST> rdomain RDO mtu 32768 |