diff options
author | Darren Tucker <dtucker@cvs.openbsd.org> | 2013-11-09 05:41:35 +0000 |
---|---|---|
committer | Darren Tucker <dtucker@cvs.openbsd.org> | 2013-11-09 05:41:35 +0000 |
commit | 7c6002965f60f0c23aefcc44763fc04c3f797441 (patch) | |
tree | fa57885c3f01fbacc851eb2b8c37cde10f85ac22 /regress/usr.bin/ssh | |
parent | cb1a37000b5097e4ad682a18fa3cd03d4a5be18d (diff) |
Use smaller test data files to speed up tests. Grow test datafiles
where necessary for a specific test.
Diffstat (limited to 'regress/usr.bin/ssh')
-rw-r--r-- | regress/usr.bin/ssh/rekey.sh | 4 | ||||
-rw-r--r-- | regress/usr.bin/ssh/test-exec.sh | 21 |
2 files changed, 20 insertions, 5 deletions
diff --git a/regress/usr.bin/ssh/rekey.sh b/regress/usr.bin/ssh/rekey.sh index 6095da8d520..fe81f0c331d 100644 --- a/regress/usr.bin/ssh/rekey.sh +++ b/regress/usr.bin/ssh/rekey.sh @@ -1,4 +1,4 @@ -# $OpenBSD: rekey.sh,v 1.12 2013/11/08 01:06:14 dtucker Exp $ +# $OpenBSD: rekey.sh,v 1.13 2013/11/09 05:41:34 dtucker Exp $ # Placed in the Public Domain. tid="rekey" @@ -26,6 +26,8 @@ ssh_data_rekeying() fi } +increase_datafile_size 300 + opts="" for i in `${SSH} -Q kex`; do opts="$opts KexAlgorithms=$i" diff --git a/regress/usr.bin/ssh/test-exec.sh b/regress/usr.bin/ssh/test-exec.sh index 80e7a5a8589..d5fc2c8ab08 100644 --- a/regress/usr.bin/ssh/test-exec.sh +++ b/regress/usr.bin/ssh/test-exec.sh @@ -1,4 +1,4 @@ -# $OpenBSD: test-exec.sh,v 1.46 2013/06/21 02:26:26 djm Exp $ +# $OpenBSD: test-exec.sh,v 1.47 2013/11/09 05:41:34 dtucker Exp $ # Placed in the Public Domain. USER=`id -un` @@ -94,7 +94,12 @@ fi # Path to sshd must be absolute for rexec case "$SSHD" in /*) ;; -*) SSHD=`which sshd` ;; +*) SSHD=`which $SSHD` ;; +esac + +case "$SSHAGENT" in +/*) ;; +*) SSHAGENT=`which $SSHAGENT` ;; esac # Logfiles. @@ -127,13 +132,21 @@ SSH="$SSHLOGWRAP" # Some test data. We make a copy because some tests will overwrite it. # The tests may assume that $DATA exists and is writable and $COPY does -# not exist. +# not exist. Tests requiring larger data files can call increase_datafile_size +# [kbytes] to ensure the file is at least that large. DATANAME=data DATA=$OBJ/${DATANAME} -cat ${SSH} ${SSHD} >${DATA} +cat ${SSHAGENT} >${DATA} COPY=$OBJ/copy rm -f ${COPY} +increase_datafile_size() +{ + while [ `du -k ${DATA} | cut -f1` -lt $1 ]; do + cat ${SSHAGENT} >>${DATA} + done +} + # these should be used in tests export SSH SSHD SSHAGENT SSHADD SSHKEYGEN SSHKEYSCAN SFTP SFTPSERVER SCP #echo $SSH $SSHD $SSHAGENT $SSHADD $SSHKEYGEN $SSHKEYSCAN $SFTP $SFTPSERVER $SCP |