summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
Diffstat (limited to 'regress')
-rw-r--r--regress/dynamic-forward.sh26
1 files changed, 3 insertions, 23 deletions
diff --git a/regress/dynamic-forward.sh b/regress/dynamic-forward.sh
index d6df4491a..0a862b504 100644
--- a/regress/dynamic-forward.sh
+++ b/regress/dynamic-forward.sh
@@ -1,4 +1,4 @@
1# $OpenBSD: dynamic-forward.sh,v 1.6 2011/05/20 06:32:30 dtucker Exp $ 1# $OpenBSD: dynamic-forward.sh,v 1.7 2011/05/31 02:01:58 dtucker Exp $
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4tid="dynamic forwarding" 4tid="dynamic forwarding"
@@ -21,21 +21,8 @@ start_sshd
21 21
22for p in 1 2; do 22for p in 1 2; do
23 trace "start dynamic forwarding, fork to background" 23 trace "start dynamic forwarding, fork to background"
24 rm -f $OBJ/remote_pid 24 ${SSH} -$p -F $OBJ/ssh_config -f -D $FWDPORT -q somehost \
25 ${SSH} -$p -F $OBJ/ssh_config -D $FWDPORT -q somehost \ 25 exec sh -c \'"echo \$\$ > $OBJ/remote_pid; exec sleep 444"\'
26 exec sh -c \'"echo \$\$ > $OBJ/remote_pid; exec sleep 444"\' &
27 client_pid=$!
28
29 # Wait for ssh to start
30 n=0
31 while test ! -f $OBJ/remote_pid; do
32 sleep 1
33 n=`expr $n + 1`
34 if test $n -gt 60; then
35 kill $client_pid
36 fail "Timed out waiting for client to connect"
37 fi
38 done
39 26
40 for s in 4 5; do 27 for s in 4 5; do
41 for h in 127.0.0.1 localhost; do 28 for h in 127.0.0.1 localhost; do
@@ -54,14 +41,7 @@ for p in 1 2; do
54 if [ $remote -gt 1 ]; then 41 if [ $remote -gt 1 ]; then
55 kill -HUP $remote 42 kill -HUP $remote
56 fi 43 fi
57 rm -f $OBJ/remote_pid
58 else 44 else
59 fail "no pid file: $OBJ/remote_pid" 45 fail "no pid file: $OBJ/remote_pid"
60 fi 46 fi
61
62 # Wait for listening ssh to terminate
63 wait
64
65 # Must allow time for connection tear-down
66 sleep 2
67done 47done