Bugzilla – Attachment 2924 Details for
Bug 2658
Make integrity tests more robust against timeouts
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Make integrity tests more robust against timeouts
0001-Make-integrity-tests-more-robust-against-timeouts.patch (text/plain), 1.75 KB, created by
Colin Watson
on 2017-01-02 02:28:43 AEDT
(
hide
)
Description:
Make integrity tests more robust against timeouts
Filename:
MIME Type:
Creator:
Colin Watson
Created:
2017-01-02 02:28:43 AEDT
Size:
1.75 KB
patch
obsolete
>From ebce8069ee17bd59fc06ac8177de160a8b7c572a Mon Sep 17 00:00:00 2001 >From: Colin Watson <cjwatson@debian.org> >Date: Sun, 1 Jan 2017 15:21:10 +0000 >Subject: [PATCH] Make integrity tests more robust against timeouts > >If the first test in a series for a given MAC happens to modify the low >bytes of a packet length, then ssh will time out and this will be >interpreted as a test failure. Handle this failure mode. >--- > regress/integrity.sh | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > >diff --git a/regress/integrity.sh b/regress/integrity.sh >index 39d310d..fd7d58b 100644 >--- a/regress/integrity.sh >+++ b/regress/integrity.sh >@@ -5,8 +5,6 @@ tid="integrity" > cp $OBJ/sshd_proxy $OBJ/sshd_proxy_bak > > # start at byte 2900 (i.e. after kex) and corrupt at different offsets >-# XXX the test hangs if we modify the low bytes of the packet length >-# XXX and ssh tries to read... > tries=10 > startoffset=2900 > macs=`${SSH} -Q mac` >@@ -27,6 +25,7 @@ for m in $macs; do > elen=0 > epad=0 > emac=0 >+ etmo=0 > ecnt=0 > skip=0 > for off in `jot $tries $startoffset`; do >@@ -61,14 +60,16 @@ for m in $macs; do > Corrupted?MAC* | *message?authentication?code?incorrect*) > emac=`expr $emac + 1`; skip=0;; > padding*) epad=`expr $epad + 1`; skip=0;; >+ *Timeout,?server*) >+ etmo=`expr $etmo + 1`; skip=0;; > *) fail "unexpected error mac $m at $off: $out";; > esac > done >- verbose "test $tid: $ecnt errors: mac $emac padding $epad length $elen" >+ verbose "test $tid: $ecnt errors: mac $emac padding $epad length $elen timeout $etmo" > if [ $emac -eq 0 ]; then > fail "$m: no mac errors" > fi >- expect=`expr $ecnt - $epad - $elen` >+ expect=`expr $ecnt - $epad - $elen - $etmo` > if [ $emac -ne $expect ]; then > fail "$m: expected $expect mac errors, got $emac" > fi >-- >2.7.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
djm
:
ok+
Actions:
View
|
Diff
Attachments on
bug 2658
: 2924