]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
fix forward test
authorEvan Hunt <each@isc.org>
Wed, 23 Jan 2019 04:34:19 +0000 (20:34 -0800)
committerEvan Hunt <each@isc.org>
Fri, 25 Jan 2019 19:24:09 +0000 (11:24 -0800)
strip CR characters before using sed

bin/tests/system/forward/tests.sh

index 8fd22fc837b8fb1573f2134139a42393f424523c..5a63e06e86c8b502eb9db940377891d9156488d6 100644 (file)
@@ -142,7 +142,7 @@ echo "//" | $SENDCMD
 # resolution.
 $DIG $DIGOPTS txt.example7. txt @$f1 > dig.out.f1 || ret=1
 # The forwarder for the "example7" zone should only be queried once.
-sent=`sed -n '/sending packet to 10.53.0.6/,/^$/p' ns3/named.run | grep ";txt.example7.*IN.*TXT" | wc -l`
+sent=`tr -d '\r' < ns3/named.run | sed -n '/sending packet to 10.53.0.6/,/^$/p' | grep ";txt.example7.*IN.*TXT" | wc -l`
 if [ $sent -ne 1 ]; then ret=1; fi
 if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
@@ -150,7 +150,7 @@ status=`expr $status + $ret`
 echo_i "checking that priming queries are not forwarded"
 ret=0
 $DIG $DIGOPTS +noadd +noauth txt.example1. txt @10.53.0.7 > dig.out.f7 || ret=1
-sent=`sed -n '/sending packet to 10.53.0.1/,/^$/p' ns7/named.run | grep ";.*IN.*NS" | wc -l`
+sent=`tr -d '\r' < ns7/named.run | sed -n '/sending packet to 10.53.0.1/,/^$/p' | grep ";.*IN.*NS" | wc -l`
 [ $sent -eq 1 ] || ret=1
 sent=`grep "10.53.0.7#.* (.): query '\./NS/IN' approved" ns4/named.run | wc -l`
 [ $sent -eq 0 ] || ret=1