diff options
author | Darren Tucker <dtucker@zip.com.au> | 2013-03-12 11:19:40 +1100 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2013-03-12 11:19:40 +1100 |
commit | fe10a28e088751ec3a6ac96e73be21bae8b86d70 (patch) | |
tree | 39220c0f85435715900b6215e6ff19af1b5bbcae /regress | |
parent | e4f43478228256ddbbce3b7f0c312ff5c707b667 (diff) |
- (dtucker) [regress/Makefile regress/cipher-speed.sh regress/test-exec.sh]
Improve portability of cipher-speed test, based mostly on a patch from
Iain Morgan.
Diffstat (limited to 'regress')
-rw-r--r-- | regress/Makefile | 2 | ||||
-rw-r--r-- | regress/cipher-speed.sh | 9 | ||||
-rw-r--r-- | regress/test-exec.sh | 4 |
3 files changed, 9 insertions, 6 deletions
diff --git a/regress/Makefile b/regress/Makefile index 779abf4fb..6ef5d9cce 100644 --- a/regress/Makefile +++ b/regress/Makefile | |||
@@ -71,7 +71,7 @@ INTEROP_TESTS= putty-transfer putty-ciphers putty-kex conch-ciphers | |||
71 | USER!= id -un | 71 | USER!= id -un |
72 | CLEANFILES= t2.out t3.out t6.out1 t6.out2 t7.out t7.out.pub copy.1 copy.2 \ | 72 | CLEANFILES= t2.out t3.out t6.out1 t6.out2 t7.out t7.out.pub copy.1 copy.2 \ |
73 | t8.out t8.out.pub t9.out t9.out.pub \ | 73 | t8.out t8.out.pub t9.out t9.out.pub \ |
74 | authorized_keys_${USER} known_hosts pidfile \ | 74 | authorized_keys_${USER} known_hosts pidfile testdata \ |
75 | ssh_config sshd_config.orig ssh_proxy sshd_config sshd_proxy \ | 75 | ssh_config sshd_config.orig ssh_proxy sshd_config sshd_proxy \ |
76 | rsa.pub rsa rsa1.pub rsa1 host.rsa host.rsa1 \ | 76 | rsa.pub rsa rsa1.pub rsa1 host.rsa host.rsa1 \ |
77 | rsa-agent rsa-agent.pub rsa1-agent rsa1-agent.pub \ | 77 | rsa-agent rsa-agent.pub rsa1-agent rsa1-agent.pub \ |
diff --git a/regress/cipher-speed.sh b/regress/cipher-speed.sh index 21bf0f2e9..65e5f35ec 100644 --- a/regress/cipher-speed.sh +++ b/regress/cipher-speed.sh | |||
@@ -5,12 +5,11 @@ tid="cipher speed" | |||
5 | 5 | ||
6 | getbytes () | 6 | getbytes () |
7 | { | 7 | { |
8 | sed -n '/transferred/s/.*secs (\(.* bytes.sec\).*/\1/p' | 8 | sed -n -e '/transferred/s/.*secs (\(.* bytes.sec\).*/\1/p' \ |
9 | -e '/copied/s/.*s, \(.* MB.s\).*/\1/p' | ||
9 | } | 10 | } |
10 | 11 | ||
11 | tries="1 2" | 12 | tries="1 2" |
12 | DATA=/bin/ls | ||
13 | DATA=/bsd | ||
14 | 13 | ||
15 | ciphers="aes128-cbc 3des-cbc blowfish-cbc cast128-cbc | 14 | ciphers="aes128-cbc 3des-cbc blowfish-cbc cast128-cbc |
16 | arcfour128 arcfour256 arcfour | 15 | arcfour128 arcfour256 arcfour |
@@ -26,7 +25,7 @@ config_defined HAVE_EVP_SHA256 && \ | |||
26 | for c in $ciphers; do n=0; for m in $macs; do | 25 | for c in $ciphers; do n=0; for m in $macs; do |
27 | trace "proto 2 cipher $c mac $m" | 26 | trace "proto 2 cipher $c mac $m" |
28 | for x in $tries; do | 27 | for x in $tries; do |
29 | echon "$c/$m:\t" | 28 | printf "%-60s" "$c/$m:" |
30 | ( ${SSH} -o 'compression no' \ | 29 | ( ${SSH} -o 'compression no' \ |
31 | -F $OBJ/ssh_proxy -2 -m $m -c $c somehost \ | 30 | -F $OBJ/ssh_proxy -2 -m $m -c $c somehost \ |
32 | exec sh -c \'"dd of=/dev/null obs=32k"\' \ | 31 | exec sh -c \'"dd of=/dev/null obs=32k"\' \ |
@@ -47,7 +46,7 @@ ciphers="3des blowfish" | |||
47 | for c in $ciphers; do | 46 | for c in $ciphers; do |
48 | trace "proto 1 cipher $c" | 47 | trace "proto 1 cipher $c" |
49 | for x in $tries; do | 48 | for x in $tries; do |
50 | echon "$c:\t" | 49 | printf "%-60s" "$c:" |
51 | ( ${SSH} -o 'compression no' \ | 50 | ( ${SSH} -o 'compression no' \ |
52 | -F $OBJ/ssh_proxy -1 -c $c somehost \ | 51 | -F $OBJ/ssh_proxy -1 -c $c somehost \ |
53 | exec sh -c \'"dd of=/dev/null obs=32k"\' \ | 52 | exec sh -c \'"dd of=/dev/null obs=32k"\' \ |
diff --git a/regress/test-exec.sh b/regress/test-exec.sh index bdc2c1a49..aa4e6e5c0 100644 --- a/regress/test-exec.sh +++ b/regress/test-exec.sh | |||
@@ -140,6 +140,10 @@ if [ "x$TEST_SSH_LOGFILE" = "x" ]; then | |||
140 | TEST_SSH_LOGFILE=/dev/null | 140 | TEST_SSH_LOGFILE=/dev/null |
141 | fi | 141 | fi |
142 | 142 | ||
143 | # Some data for test copies | ||
144 | DATA=$OBJ/testdata | ||
145 | cat $SSHD${EXEEXT} $SSHD${EXEEXT} $SSHD${EXEEXT} $SSHD${EXEEXT} >$DATA | ||
146 | |||
143 | # these should be used in tests | 147 | # these should be used in tests |
144 | export SSH SSHD SSHAGENT SSHADD SSHKEYGEN SSHKEYSCAN SFTP SFTPSERVER SCP | 148 | export SSH SSHD SSHAGENT SSHADD SSHKEYGEN SSHKEYSCAN SFTP SFTPSERVER SCP |
145 | #echo $SSH $SSHD $SSHAGENT $SSHADD $SSHKEYGEN $SSHKEYSCAN $SFTP $SFTPSERVER $SCP | 149 | #echo $SSH $SSHD $SSHAGENT $SSHADD $SSHKEYGEN $SSHKEYSCAN $SFTP $SFTPSERVER $SCP |