diff options
author | Damien Miller <djm@mindrot.org> | 2012-12-12 02:10:10 +0100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2012-12-12 02:10:10 +0100 |
commit | 9fec296b0ac3e17ea1dcdf01761870297f7fd50a (patch) | |
tree | 1bd12121cc556b8913f4d3f8c2229bb0314fde48 | |
parent | - (djm) [mac.c] fix merge botch (diff) | |
download | openssh-9fec296b0ac3e17ea1dcdf01761870297f7fd50a.tar.xz openssh-9fec296b0ac3e17ea1dcdf01761870297f7fd50a.zip |
- (djm) [regress/Makefile regress/integrity.sh] Make the integrity.sh test
work on platforms without 'jot'
-rw-r--r-- | regress/Makefile | 8 | ||||
-rw-r--r-- | regress/integrity.sh | 7 |
2 files changed, 10 insertions, 5 deletions
diff --git a/regress/Makefile b/regress/Makefile index 2eb2e3181..636858662 100644 --- a/regress/Makefile +++ b/regress/Makefile @@ -81,7 +81,7 @@ CLEANFILES= t2.out t3.out t6.out1 t6.out2 t7.out t7.out.pub copy.1 copy.2 \ putty.rsa2 sshd_proxy_orig ssh_proxy_bak \ key.rsa-* key.dsa-* key.ecdsa-* \ authorized_principals_${USER} expect actual ready \ - sshd_proxy.* authorized_keys_${USER}.* + sshd_proxy.* authorized_keys_${USER}.* modpipe # Enable all malloc(3) randomisations and checks @@ -143,15 +143,15 @@ t9: $(OBJ)/t9.out test "${TEST_SSH_ECC}" != yes || \ ${TEST_SSH_SSHKEYGEN} -Bf $(OBJ)/t9.out > /dev/null -modpipe: modpipe.c - -t-exec: modpipe ${LTESTS:=.sh} +t-exec: ${LTESTS:=.sh} modpipe @if [ "x$?" = "x" ]; then exit 0; fi; \ for TEST in ""$?; do \ echo "run test $${TEST}" ... 1>&2; \ (env SUDO="${SUDO}" TEST_ENV=${TEST_ENV} sh ${.CURDIR}/test-exec.sh ${.OBJDIR} ${.CURDIR}/$${TEST}) || exit $$?; \ done +modpipe: modpipe.c + t-exec-interop: ${INTEROP_TESTS:=.sh} @if [ "x$?" = "x" ]; then exit 0; fi; \ for TEST in ""$?; do \ diff --git a/regress/integrity.sh b/regress/integrity.sh index 23135685c..f6e5c1963 100644 --- a/regress/integrity.sh +++ b/regress/integrity.sh @@ -18,6 +18,10 @@ macs="hmac-sha1 hmac-md5 umac-64@openssh.com umac-128@openssh.com # sshd-command for proxy (see test-exec.sh) cmd="sh ${SRC}/sshd-log-wrapper.sh ${SSHD} ${TEST_SSH_LOGFILE} -i -f $OBJ/sshd_proxy" +jot() { + awk 'BEGIN { for (i = $2; i < $2 + $1; i++) { printf "%d\n", i } }' +} +set -x for m in $macs; do trace "test $tid: mac $m" elen=0 @@ -26,7 +30,8 @@ for m in $macs; do ecnt=0 skip=0 for off in $(jot $tries $startoffset); do - if [ $((skip--)) -gt 0 ]; then + skip=$((skip - 1)) + if [ $skip -gt 0 ]; then # avoid modifying the high bytes of the length continue fi |