summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--regress/dynamic-forward.sh22
2 files changed, 22 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index af92ed3f9..c4ced5da6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -29,6 +29,11 @@
29 - dtucker@cvs.openbsd.org 2011/05/31 02:03:34 29 - dtucker@cvs.openbsd.org 2011/05/31 02:03:34
30 [regress/dynamic-forward.sh] 30 [regress/dynamic-forward.sh]
31 work around startup and teardown races; caught by deraadt 31 work around startup and teardown races; caught by deraadt
32 - dtucker@cvs.openbsd.org 2011/06/03 00:29:52
33 [regress/dynamic-forward.sh]
34 Retry establishing the port forwarding after a small delay, should make
35 the tests less flaky when the previous test is slow to shut down and free
36 up the port.
32 37
3320110529 3820110529
34 - (djm) OpenBSD CVS Sync 39 - (djm) OpenBSD CVS Sync
diff --git a/regress/dynamic-forward.sh b/regress/dynamic-forward.sh
index 39b58c817..d1ab8059b 100644
--- a/regress/dynamic-forward.sh
+++ b/regress/dynamic-forward.sh
@@ -1,4 +1,4 @@
1# $OpenBSD: dynamic-forward.sh,v 1.8 2011/05/31 02:03:34 dtucker Exp $ 1# $OpenBSD: dynamic-forward.sh,v 1.9 2011/06/03 00:29:52 dtucker Exp $
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4tid="dynamic forwarding" 4tid="dynamic forwarding"
@@ -20,10 +20,23 @@ trace "will use ProxyCommand $proxycmd"
20start_sshd 20start_sshd
21 21
22for p in 1 2; do 22for p in 1 2; do
23 n=0
24 error="1"
23 trace "start dynamic forwarding, fork to background" 25 trace "start dynamic forwarding, fork to background"
24 ${SSH} -$p -F $OBJ/ssh_config -f -D $FWDPORT -q \ 26 while [ "$error" -ne 0 -a "$n" -lt 3 ]; do
25 -oExitOnForwardFailure=yes somehost \ 27 n=`expr $n + 1`
26 exec sh -c \'"echo \$\$ > $OBJ/remote_pid; exec sleep 444"\' 28 ${SSH} -$p -F $OBJ/ssh_config -f -D $FWDPORT -q \
29 -oExitOnForwardFailure=yes somehost exec sh -c \
30 \'"echo \$\$ > $OBJ/remote_pid; exec sleep 444"\'
31 error=$?
32 if [ "$error" -ne 0 ]; then
33 trace "forward failed proto $p attempt $n err $error"
34 sleep $n
35 fi
36 done
37 if [ "$error" -ne 0 ]; then
38 fatal "failed to start dynamic forwarding proto $p"
39 fi
27 40
28 for s in 4 5; do 41 for s in 4 5; do
29 for h in 127.0.0.1 localhost; do 42 for h in 127.0.0.1 localhost; do
@@ -42,7 +55,6 @@ for p in 1 2; do
42 if [ $remote -gt 1 ]; then 55 if [ $remote -gt 1 ]; then
43 kill -HUP $remote 56 kill -HUP $remote
44 fi 57 fi
45 sleep 1
46 else 58 else
47 fail "no pid file: $OBJ/remote_pid" 59 fail "no pid file: $OBJ/remote_pid"
48 fi 60 fi