mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-09-25 10:58:56 +02:00
- dtucker@cvs.openbsd.org 2011/06/03 00:29:52
[regress/dynamic-forward.sh] Retry establishing the port forwarding after a small delay, should make the tests less flaky when the previous test is slow to shut down and free up the port.
This commit is contained in:
parent
75e035c34e
commit
bf4d05a37c
@ -29,6 +29,11 @@
|
|||||||
- dtucker@cvs.openbsd.org 2011/05/31 02:03:34
|
- dtucker@cvs.openbsd.org 2011/05/31 02:03:34
|
||||||
[regress/dynamic-forward.sh]
|
[regress/dynamic-forward.sh]
|
||||||
work around startup and teardown races; caught by deraadt
|
work around startup and teardown races; caught by deraadt
|
||||||
|
- dtucker@cvs.openbsd.org 2011/06/03 00:29:52
|
||||||
|
[regress/dynamic-forward.sh]
|
||||||
|
Retry establishing the port forwarding after a small delay, should make
|
||||||
|
the tests less flaky when the previous test is slow to shut down and free
|
||||||
|
up the port.
|
||||||
|
|
||||||
20110529
|
20110529
|
||||||
- (djm) OpenBSD CVS Sync
|
- (djm) OpenBSD CVS Sync
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# $OpenBSD: dynamic-forward.sh,v 1.8 2011/05/31 02:03:34 dtucker Exp $
|
# $OpenBSD: dynamic-forward.sh,v 1.9 2011/06/03 00:29:52 dtucker Exp $
|
||||||
# Placed in the Public Domain.
|
# Placed in the Public Domain.
|
||||||
|
|
||||||
tid="dynamic forwarding"
|
tid="dynamic forwarding"
|
||||||
@ -20,10 +20,23 @@ trace "will use ProxyCommand $proxycmd"
|
|||||||
start_sshd
|
start_sshd
|
||||||
|
|
||||||
for p in 1 2; do
|
for p in 1 2; do
|
||||||
|
n=0
|
||||||
|
error="1"
|
||||||
trace "start dynamic forwarding, fork to background"
|
trace "start dynamic forwarding, fork to background"
|
||||||
|
while [ "$error" -ne 0 -a "$n" -lt 3 ]; do
|
||||||
|
n=`expr $n + 1`
|
||||||
${SSH} -$p -F $OBJ/ssh_config -f -D $FWDPORT -q \
|
${SSH} -$p -F $OBJ/ssh_config -f -D $FWDPORT -q \
|
||||||
-oExitOnForwardFailure=yes somehost \
|
-oExitOnForwardFailure=yes somehost exec sh -c \
|
||||||
exec sh -c \'"echo \$\$ > $OBJ/remote_pid; exec sleep 444"\'
|
\'"echo \$\$ > $OBJ/remote_pid; exec sleep 444"\'
|
||||||
|
error=$?
|
||||||
|
if [ "$error" -ne 0 ]; then
|
||||||
|
trace "forward failed proto $p attempt $n err $error"
|
||||||
|
sleep $n
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if [ "$error" -ne 0 ]; then
|
||||||
|
fatal "failed to start dynamic forwarding proto $p"
|
||||||
|
fi
|
||||||
|
|
||||||
for s in 4 5; do
|
for s in 4 5; do
|
||||||
for h in 127.0.0.1 localhost; do
|
for h in 127.0.0.1 localhost; do
|
||||||
@ -42,7 +55,6 @@ for p in 1 2; do
|
|||||||
if [ $remote -gt 1 ]; then
|
if [ $remote -gt 1 ]; then
|
||||||
kill -HUP $remote
|
kill -HUP $remote
|
||||||
fi
|
fi
|
||||||
sleep 1
|
|
||||||
else
|
else
|
||||||
fail "no pid file: $OBJ/remote_pid"
|
fail "no pid file: $OBJ/remote_pid"
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user