]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
fix cookie test
authorEvan Hunt <each@isc.org>
Wed, 23 Jan 2019 01:53:57 +0000 (17:53 -0800)
committerEvan Hunt <each@isc.org>
Fri, 25 Jan 2019 19:24:09 +0000 (11:24 -0800)
strip CR characters before comparing files

bin/tests/system/cookie/tests.sh

index b6eab361853ea9ac13bf3609d08df72dcd507423..598a9b9ab29e71865b6f71611c9fa9c7547cc0b3 100755 (executable)
@@ -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`