diff options
author | 2013-11-09 05:41:34 +0000 | |
---|---|---|
committer | 2013-11-09 05:41:34 +0000 | |
commit | 8525e67b42e699286540e957012d38e88c2ba64e (patch) | |
tree | f6f176814388a507459f3421c4e74a2e397d476f | |
parent | unbias the chunks and chunktable writing and reading. as a result, it (diff) | |
download | wireguard-openbsd-8525e67b42e699286540e957012d38e88c2ba64e.tar.xz wireguard-openbsd-8525e67b42e699286540e957012d38e88c2ba64e.zip |
Use smaller test data files to speed up tests. Grow test datafiles
where necessary for a specific test.
-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 |