diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2017-09-12 08:43:15 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2017-09-12 08:43:15 +0000 |
commit | 57c3f45ab7dfcc34c6e67d82bbf93995541fe57f (patch) | |
tree | ebbd9578a76738cad74ee447825e009e85fc80b2 /regress/sbin/route/Makefile | |
parent | a03731a3adb73bebc5c713b78dfda71e38dd18da (diff) |
Sleep for some time to avoid race reporting a different number of reference
count.
Iterating over the routing table implies using SRP which bump the refcount
of routes for a short period of time. Depending on how work is schedule
the second ifconfig(8) command might run before the timer dereference the
route.
Should fix races on bluhm@'s test setup.
Diffstat (limited to 'regress/sbin/route/Makefile')
-rw-r--r-- | regress/sbin/route/Makefile | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/regress/sbin/route/Makefile b/regress/sbin/route/Makefile index 8f20b24b681..b5f596f556f 100644 --- a/regress/sbin/route/Makefile +++ b/regress/sbin/route/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.22 2017/09/05 11:14:47 mpi Exp $ +# $OpenBSD: Makefile,v 1.23 2017/09/12 08:43:14 mpi Exp $ RDOMAIN?= 5 @@ -120,8 +120,8 @@ rttest${n}: ${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 - @# Work around a race that mess up the route reference counts - @sleep .1 + # Wait until SRP reference count are dropped + sleep .1 ${RCMD} show -inet 2>&1 | \ diff -u ${.CURDIR}/${.TARGET}.ok /dev/stdin @@ -341,6 +341,8 @@ rttest${n}: ${SUDO} ifconfig vlan99 inet alias 10.1.255.2/14 ${SUDO} ifconfig vlan99 inet alias 10.1.255.3/14 ${SUDO} ifconfig vlan99 down + # Wait until SRP reference count are dropped + sleep .1 ${RCMD} show -inet 2>&1 | \ diff -u ${.CURDIR}/${.TARGET}.ok /dev/stdin ${SUDO} ifconfig vlan99 destroy |