From 5979471dc758476d45fc40312cb83b50b11e0db0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Witold=20Kr=C4=99cicki?= Date: Thu, 25 Oct 2018 19:37:32 +0000 Subject: [PATCH 1/2] statschannel test: try 5 times to check if compressed and regular output of statschannel is the same - some counters can change, minimize risk of bad timing --- bin/tests/system/statschannel/tests.sh | 34 ++++++++++++++++---------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/bin/tests/system/statschannel/tests.sh b/bin/tests/system/statschannel/tests.sh index a91b0c1448..37146eafa3 100644 --- a/bin/tests/system/statschannel/tests.sh +++ b/bin/tests/system/statschannel/tests.sh @@ -197,20 +197,28 @@ if [ $ret != 0 ]; then echo_i "failed"; fi status=`expr $status + $ret` n=`expr $n + 1` -ret=0 echo_i "checking consistency between regular and compressed output ($n)" -if [ "$HAVEXMLSTATS" ]; -then - URL=http://10.53.0.2:${EXTRAPORT1}/xml/v3/server -else - URL=http://10.53.0.2:${EXTRAPORT1}/json/v1/server -fi -$CURL -D regular.headers $URL 2>/dev/null | \ - sed -e "s#.*##g" > regular.out -$CURL -D compressed.headers --compressed $URL 2>/dev/null | \ - sed -e "s#.*##g" > compressed.out -diff regular.out compressed.out >/dev/null || ret=1 -if [ $ret != 0 ]; then echo_i "failed"; fi +for i in 1 2 3 4 5; do + ret=0 + if [ "$HAVEXMLSTATS" ]; + then + URL=http://10.53.0.2:${EXTRAPORT1}/xml/v3/server + else + URL=http://10.53.0.2:${EXTRAPORT1}/json/v1/server + fi + $CURL -D regular.headers $URL 2>/dev/null | \ + sed -e "s#.*##g" > regular.out + $CURL -D compressed.headers --compressed $URL 2>/dev/null | \ + sed -e "s#.*##g" > compressed.out + diff regular.out compressed.out >/dev/null || ret=1 + if [ $ret != 0 ]; then + echo_i "failed on try $i, probably a timing issue, trying again" + sleep 1 + else + break + fi +done + status=`expr $status + $ret` n=`expr $n + 1` From b338e6dd21aa9be67aed3b584315175cd7690957 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Witold=20Kr=C4=99cicki?= Date: Fri, 26 Oct 2018 08:38:00 +0000 Subject: [PATCH 2/2] CHANGES --- CHANGES | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 27bf2ce4de..f887d92dd4 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,9 @@ +5063. [test] In statschannel test try a few times before failing when + checking if the compressed output is the same as + uncompressed. [GL !909] + 5062. [func] Use non-crypto-secure PRNG to generate nonces for - cookies [GL !887] + cookies. [GL !887] 5061. [protocol] Add support for EID and NIMLOC. [GL #626]