[PATCH] Speed up dynamic-forward regression test
Darren Tucker
dtucker at zip.com.au
Thu Jul 3 14:51:30 EST 2003
Hi All.
The attached patch speeds up the dynamic forwarding regression test:
* moves starting the test sshd to the outer loop.
* kills the sleep of when it's no longer required.
-Daz.
$ time PATH="`pwd`:$PATH" sh ../regress/test-exec.sh `pwd` \
../regress/dynamic-forward.orig.sh
ok dynamic forwarding
real 0m54.585s
user 0m5.760s
sys 0m0.370s
$ time PATH="`pwd`:$PATH" sh ../regress/test-exec.sh `pwd` \
../regress/dynamic-forward.sh
ok dynamic forwarding
real 0m13.066s
user 0m5.330s
sys 0m0.400s
--
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69
Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.
-------------- next part --------------
Index: regress/dynamic-forward.sh
===================================================================
RCS file: /usr/local/src/security/openssh/cvs/openssh_cvs/regress/dynamic-forward.sh,v
retrieving revision 1.1
diff -u -r1.1 dynamic-forward.sh
--- regress/dynamic-forward.sh 28 Jun 2003 02:42:09 -0000 1.1
+++ regress/dynamic-forward.sh 3 Jul 2003 04:46:53 -0000
@@ -19,19 +19,17 @@
start_sshd
for p in 1 2; do
+ trace "start dynamic forwarding, fork to background"
+ ${SSH} -$p -F $OBJ/ssh_config -f -D $FWDPORT -q somehost \
+ "echo \$\$ >$OBJ/remote_pid; exec sleep 10"
for s in 4; do
for h in 127.0.0.1 localhost; do
trace "testing ssh protocol $p socks version $s host $h"
- trace "start dynamic forwarding, fork to background"
- ${SSH} -$p -F $OBJ/ssh_config -f -D $FWDPORT somehost sleep 10
-
- trace "transfer over forwarded channel and check result"
${SSH} -F $OBJ/ssh_config -o "ProxyCommand ${proxycmd}${s} $h $PORT" \
somehost cat /bin/ls > $OBJ/ls.copy
test -f $OBJ/ls.copy || fail "failed copy /bin/ls"
cmp /bin/ls $OBJ/ls.copy || fail "corrupted copy of /bin/ls"
-
- sleep 10
done
done
+ kill -HUP `cat $OBJ/remote_pid`
done
More information about the openssh-unix-dev
mailing list