From: Evan Hunt Date: Wed, 23 Jan 2019 01:53:57 +0000 (-0800) Subject: fix cookie test X-Git-Tag: v9.13.6~36^2~15 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=673cd0beebd6ac73b3f9e56733c60de137109dad;p=thirdparty%2Fbind9.git fix cookie test strip CR characters before comparing files --- diff --git a/bin/tests/system/cookie/tests.sh b/bin/tests/system/cookie/tests.sh index b6eab361853..598a9b9ab29 100755 --- a/bin/tests/system/cookie/tests.sh +++ b/bin/tests/system/cookie/tests.sh @@ -21,7 +21,7 @@ n=0 getcookie() { awk '$2 == "COOKIE:" { print $3; - }' < $1 + }' < $1 | tr -d '\r' } fullcookie() { @@ -37,21 +37,21 @@ havetc() { for bad in bad*.conf do n=`expr $n + 1` - echo_i "checking that named-checkconf detects error in $bad ($n)" - ret=0 - $CHECKCONF $bad > /dev/null 2>&1 && ret=1 - if [ $ret != 0 ]; then echo_i "failed"; fi - status=`expr $status + $ret` + echo_i "checking that named-checkconf detects error in $bad ($n)" + ret=0 + $CHECKCONF $bad > /dev/null 2>&1 && ret=1 + if [ $ret != 0 ]; then echo_i "failed"; fi + status=`expr $status + $ret` done for good in good*.conf do n=`expr $n + 1` - echo_i "checking that named-checkconf detects accepts $good ($n)" - ret=0 - $CHECKCONF $good > /dev/null 2>&1 || ret=1 - if [ $ret != 0 ]; then echo_i "failed"; fi - status=`expr $status + $ret` + echo_i "checking that named-checkconf detects accepts $good ($n)" + ret=0 + $CHECKCONF $good > /dev/null 2>&1 || ret=1 + if [ $ret != 0 ]; then echo_i "failed"; fi + status=`expr $status + $ret` done n=`expr $n + 1`