diff --git a/ChangeLog b/ChangeLog index 98b742825..95586e871 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,11 @@ - djm@cvs.openbsd.org 2013/03/07 00:20:34 [regress/proxy-connect.sh] repeat test with a style appended to the username + - dtucker@cvs.openbsd.org 2013/03/23 11:09:43 + [test-exec.sh] + Only regenerate host keys if they don't exist or if ssh-keygen has changed + since they were. Reduces test runtime by 5-30% depending on machine + speed. 20130516 - (djm) [contrib/ssh-copy-id] Fix bug that could cause "rm *" to be diff --git a/regress/test-exec.sh b/regress/test-exec.sh index aa4e6e5c0..29dac3de9 100644 --- a/regress/test-exec.sh +++ b/regress/test-exec.sh @@ -1,4 +1,4 @@ -# $OpenBSD: test-exec.sh,v 1.37 2010/02/24 06:21:56 djm Exp $ +# $OpenBSD: test-exec.sh,v 1.38 2013/03/23 11:09:43 dtucker Exp $ # Placed in the Public Domain. #SUDO=sudo @@ -309,9 +309,11 @@ rm -f $OBJ/known_hosts $OBJ/authorized_keys_$USER trace "generate keys" for t in rsa rsa1; do # generate user key - rm -f $OBJ/$t - ${SSHKEYGEN} -b 1024 -q -N '' -t $t -f $OBJ/$t ||\ - fail "ssh-keygen for $t failed" + if [ ! -f $OBJ/$t ] || [ ${SSHKEYGEN} -nt $OBJ/$t ]; then + rm -f $OBJ/$t + ${SSHKEYGEN} -q -N '' -t $t -f $OBJ/$t ||\ + fail "ssh-keygen for $t failed" + fi # known hosts file for client (