- djm@cvs.openbsd.org 2014/05/21 07:04:21

[regress/integrity.sh]
     when failing because of unexpected output, show the offending output
This commit is contained in:
Damien Miller 2014-07-02 17:01:08 +10:00
parent 5a96707ffc
commit 43d3ed2dd3
2 changed files with 7 additions and 4 deletions

View File

@ -81,6 +81,9 @@
[regress/Makefile]
unit tests for new buffer API; including basic fuzz testing
NB. Id sync only.
- djm@cvs.openbsd.org 2014/05/21 07:04:21
[regress/integrity.sh]
when failing because of unexpected output, show the offending output
20140618
- (tim) [openssh/session.c] Work around to get chroot sftp working on UnixWare

View File

@ -1,4 +1,4 @@
# $OpenBSD: integrity.sh,v 1.13 2014/04/21 22:15:37 djm Exp $
# $OpenBSD: integrity.sh,v 1.14 2014/05/21 07:04:21 djm Exp $
# Placed in the Public Domain.
tid="integrity"
@ -54,14 +54,14 @@ for m in $macs; do
fail "ssh -m $m succeeds with bit-flip at $off"
fi
ecnt=`expr $ecnt + 1`
output=$(tail -2 $TEST_SSH_LOGFILE | egrep -v "^debug" | \
out=$(tail -2 $TEST_SSH_LOGFILE | egrep -v "^debug" | \
tr -s '\r\n' '.')
case "$output" in
case "$out" in
Bad?packet*) elen=`expr $elen + 1`; skip=3;;
Corrupted?MAC* | Decryption?integrity?check?failed*)
emac=`expr $emac + 1`; skip=0;;
padding*) epad=`expr $epad + 1`; skip=0;;
*) fail "unexpected error mac $m at $off";;
*) fail "unexpected error mac $m at $off: $out";;
esac
done
verbose "test $tid: $ecnt errors: mac $emac padding $epad length $elen"