]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Revert "Merge branch '782-cygwin-grep-CRLF-issue-v9_12-v9_11' into 'v9_11'"
authorOndřej Surý <ondrej@sury.org>
Mon, 17 Dec 2018 11:44:24 +0000 (12:44 +0100)
committerOndřej Surý <ondrej@sury.org>
Mon, 17 Dec 2018 11:44:24 +0000 (12:44 +0100)
This reverts commit b644eb672bc8190e1eedb77ace089db97c9a7b14, reversing
changes made to 3b302c58e2d1ad975089d693e6649727a117b25a.

bin/tests/system/builtin/tests.sh
bin/tests/system/digdelv/tests.sh
bin/tests/system/dns64/tests.sh
bin/tests/system/rndc/tests.sh

index 48bea2c20ddc8ce73b856ef77556e919947a4a15..391c239b614ae412af2b9bfbbc9c19d27cf06c85 100644 (file)
@@ -178,28 +178,28 @@ n=`expr $n + 1`
 ret=0
 echo_i "Checking that default version works for query ($n)"
 $DIG $DIGOPTS +short version.bind txt ch @10.53.0.1 > dig.out.ns1.$n
-tr -d '\r' < dig.out.ns1.$n | grep "^\"$VERSION\"$" > /dev/null || ret=1
+grep "^\"$VERSION\"$" dig.out.ns1.$n > /dev/null || ret=1
 if [ $ret != 0 ] ; then echo_i "failed"; status=`expr $status + $ret`; fi
 
 n=`expr $n + 1`
 ret=0
 echo_i "Checking that custom version works for query ($n)"
 $DIG $DIGOPTS +short version.bind txt ch @10.53.0.3 > dig.out.ns3.$n
-tr -d '\r' < dig.out.ns3.$n | grep "^\"this is a test of version\"$" > /dev/null || ret=1
+grep "^\"this is a test of version\"$" dig.out.ns3.$n > /dev/null || ret=1
 if [ $ret != 0 ] ; then echo_i "failed"; status=`expr $status + $ret`; fi
 
 n=`expr $n + 1`
 ret=0
 echo_i "Checking that default hostname works for query ($n)"
 $DIG $DIGOPTS +short hostname.bind txt ch @10.53.0.1 > dig.out.ns1.$n
-tr -d '\r' < dig.out.ns1.$n | grep "^\"$HOSTNAME\"$" > /dev/null || ret=1
+grep "^\"$HOSTNAME\"$" dig.out.ns1.$n > /dev/null || ret=1
 if [ $ret != 0 ] ; then echo_i "failed"; status=`expr $status + $ret`; fi
 
 n=`expr $n + 1`
 ret=0
 echo_i "Checking that custom hostname works for query ($n)"
 $DIG $DIGOPTS +short hostname.bind txt ch @10.53.0.3 > dig.out.ns3.$n
-tr -d '\r' < dig.out.ns3.$n | grep "^\"this.is.a.test.of.hostname\"$" > /dev/null || ret=1
+grep "^\"this.is.a.test.of.hostname\"$" dig.out.ns3.$n > /dev/null || ret=1
 if [ $ret != 0 ] ; then echo_i "failed"; status=`expr $status + $ret`; fi
 
 n=`expr $n + 1`
@@ -214,28 +214,28 @@ n=`expr $n + 1`
 ret=0
 echo_i "Checking that server-id hostname works for query ($n)"
 $DIG $DIGOPTS +short id.server txt ch @10.53.0.2 > dig.out.ns2.$n
-tr -d '\r' < dig.out.ns2.$n | grep "^\"$HOSTNAME\"$" > /dev/null || ret=1
+grep "^\"$HOSTNAME\"$" dig.out.ns2.$n > /dev/null || ret=1
 if [ $ret != 0 ] ; then echo_i "failed"; status=`expr $status + $ret`; fi
 
 n=`expr $n + 1`
 ret=0
 echo_i "Checking that server-id hostname works for EDNS name server ID request ($n)"
 $DIG $DIGOPTS +norec +nsid foo @10.53.0.2 > dig.out.ns2.$n
-tr -d '\r' < dig.out.ns2.$n | grep "^; NSID: .* (\"$HOSTNAME\")$" > /dev/null || ret=1
+grep "^; NSID: .* (\"$HOSTNAME\")$" dig.out.ns2.$n > /dev/null || ret=1
 if [ $ret != 0 ] ; then echo_i "failed"; status=`expr $status + $ret`; fi
 
 n=`expr $n + 1`
 ret=0
 echo_i "Checking that custom server-id works for query ($n)"
 $DIG $DIGOPTS +short id.server txt ch @10.53.0.3 > dig.out.ns3.$n
-tr -d '\r' < dig.out.ns3.$n | grep "^\"this.is.a.test.of.server-id\"$" > /dev/null || ret=1
+grep "^\"this.is.a.test.of.server-id\"$" dig.out.ns3.$n > /dev/null || ret=1
 if [ $ret != 0 ] ; then echo_i "failed"; status=`expr $status + $ret`; fi
 
 n=`expr $n + 1`
 ret=0
 echo_i "Checking that custom server-id works for EDNS name server ID request ($n)"
 $DIG $DIGOPTS +norec +nsid foo @10.53.0.3 > dig.out.ns3.$n
-tr -d '\r' < dig.out.ns3.$n | grep "^; NSID: .* (\"this.is.a.test.of.server-id\")$" > /dev/null || ret=1
+grep "^; NSID: .* (\"this.is.a.test.of.server-id\")$" dig.out.ns3.$n > /dev/null || ret=1
 if [ $ret != 0 ] ; then echo_i "failed"; status=`expr $status + $ret`; fi
 
 echo_i "exit status: $status"
index cfacb363f38779ba3e141a3b890dbf051f896150..24aa7b3736bc68d12a3f0648d7ea72721d58ec4d 100644 (file)
@@ -53,7 +53,7 @@ if [ -x ${DIG} ] ; then
   echo_i "checking dig over TCP works ($n)"
   ret=0
   $DIG $DIGOPTS +tcp @10.53.0.3 a a.example > dig.out.test$n || ret=1
-  tr -d '\r' < dig.out.test$n | grep "10\\.0\\.0\\.1$" > /dev/null || ret=1
+  grep "10\.0\.0\.1$" < dig.out.test$n > /dev/null || ret=1
   if [ $ret != 0 ]; then echo_i "failed"; fi
   status=`expr $status + $ret`
 
@@ -93,7 +93,7 @@ if [ -x ${DIG} ] ; then
   echo_i "checking dig +short +nosplit works($n)"
   ret=0
   $DIG $DIGOPTS +tcp @10.53.0.3 +short +nosplit DNSKEY dnskey.example > dig.out.test$n || ret=1
-  tr -d '\r' < dig.out.test$n | grep "Z8plc4Rb9VIE5x7KNHAYTvTO5d4S8M=$" > /dev/null || ret=1
+  grep "Z8plc4Rb9VIE5x7KNHAYTvTO5d4S8M=$" < dig.out.test$n > /dev/null || ret=1
   if [ $ret != 0 ]; then echo_i "failed"; fi
   status=`expr $status + $ret`
 
@@ -101,7 +101,7 @@ if [ -x ${DIG} ] ; then
   echo_i "checking dig +short +rrcomments works($n)"
   ret=0
   $DIG $DIGOPTS +tcp @10.53.0.3 +short +rrcomments DNSKEY dnskey.example > dig.out.test$n || ret=1
-  tr -d '\r' < dig.out.test$n | grep -q "S8M=  ; ZSK; alg = RSAMD5 ; key id = 30795$" > /dev/null || ret=1
+  grep "S8M=  ; ZSK; alg = RSAMD5 ; key id = 30795$" < dig.out.test$n > /dev/null || ret=1
   if [ $ret != 0 ]; then echo_i "failed"; fi
   status=`expr $status + $ret`
 
@@ -117,7 +117,7 @@ if [ -x ${DIG} ] ; then
   echo_i "checking dig +short +rrcomments works($n)"
   ret=0
   $DIG $DIGOPTS +tcp @10.53.0.3 +short +rrcomments DNSKEY dnskey.example > dig.out.test$n || ret=1
-  tr -d '\r' < dig.out.test$n | grep -q "S8M=  ; ZSK; alg = RSAMD5 ; key id = 30795$" > /dev/null || ret=1
+  grep "S8M=  ; ZSK; alg = RSAMD5 ; key id = 30795$" < dig.out.test$n > /dev/null || ret=1
   if [ $ret != 0 ]; then echo_i "failed"; fi
   status=`expr $status + $ret`
 
@@ -416,7 +416,7 @@ ret=0
   n=`expr $n + 1`
   echo_i "check that dig processes +ednsopt=key-tag and FORMERR is returned ($n)"
   $DIG $DIGOPTS @10.53.0.3 +ednsopt=key-tag a.example +qr > dig.out.test$n 2>&1 || ret=1
-  tr -d '\r' < dig.out.test$n | grep "; KEY-TAG$" > /dev/null || ret=1
+  grep "; KEY-TAG$" dig.out.test$n > /dev/null || ret=1
   grep "status: FORMERR" dig.out.test$n > /dev/null || ret=1
   if [ $ret != 0 ]; then echo_i "failed"; fi
   status=`expr $status + $ret`
@@ -424,7 +424,7 @@ ret=0
   n=`expr $n + 1`
   echo_i "check that dig processes +ednsopt=key-tag:<value-list> ($n)"
   $DIG $DIGOPTS @10.53.0.3 +ednsopt=key-tag:00010002 a.example +qr > dig.out.test$n 2>&1 || ret=1
-  tr -d '\r' < dig.out.test$n | grep "; KEY-TAG: 1, 2$" > /dev/null || ret=1
+  grep "; KEY-TAG: 1, 2$" dig.out.test$n > /dev/null || ret=1
   grep "status: FORMERR" dig.out.test$n > /dev/null && ret=1
   if [ $ret != 0 ]; then echo_i "failed"; fi
   status=`expr $status + $ret`
@@ -450,7 +450,7 @@ ret=0
   echo_i "check that dig -q -m works ($n)"
   ret=0
   $DIG $DIGOPTS @10.53.0.3 -q -m > dig.out.test$n 2>&1
-  tr -d '\r' < dig.out.test$n | grep '^;-m\..*IN.*A$' > /dev/null || ret=1
+  grep '^;-m\..*IN.*A$' dig.out.test$n > /dev/null || ret=1
   grep "Dump of all outstanding memory allocations" dig.out.test$n > /dev/null && ret=1
   if [ $ret != 0 ]; then echo_i "failed"; fi
   status=`expr $status + $ret`
@@ -556,7 +556,7 @@ if [ -x ${DELV} ] ; then
   echo_i "checking delv over TCP works ($n)"
   ret=0
   $DELV $DELVOPTS +tcp @10.53.0.3 a a.example > delv.out.test$n || ret=1
-  tr -d '\r' < delv.out.test$n | grep "10\\.0\\.0\\.1$" > /dev/null || ret=1
+  grep "10\.0\.0\.1$" < delv.out.test$n > /dev/null || ret=1
   if [ $ret != 0 ]; then echo_i "failed"; fi
   status=`expr $status + $ret`
 
@@ -596,7 +596,7 @@ if [ -x ${DELV} ] ; then
   echo_i "checking delv +short +rrcomments works ($n)"
   ret=0
   $DELV $DELVOPTS +tcp @10.53.0.3 +short +rrcomments DNSKEY dnskey.example > delv.out.test$n || ret=1
-  tr -d '\r' < delv.out.test$n | grep "S8M=  ; ZSK; alg = RSAMD5 ; key id = 30795$" > /dev/null || ret=1
+  grep "S8M=  ; ZSK; alg = RSAMD5 ; key id = 30795$" < delv.out.test$n > /dev/null || ret=1
   if [ $ret != 0 ]; then echo_i "failed"; fi
   status=`expr $status + $ret`
 
@@ -615,7 +615,7 @@ if [ -x ${DELV} ] ; then
   echo_i "checking delv +short +nosplit +norrcomments works ($n)"
   ret=0
   $DELV $DELVOPTS +tcp @10.53.0.3 +short +nosplit +norrcomments DNSKEY dnskey.example > delv.out.test$n || ret=1
-  tr -d '\r' < delv.out.test$n | grep -q "$NOSPLIT\$" > /dev/null || ret=1
+  grep "Z8plc4Rb9VIE5x7KNHAYTvTO5d4S8M=$" < delv.out.test$n > /dev/null || ret=1
   if test `wc -l < delv.out.test$n` != 1 ; then ret=1 ; fi
   f=`awk '{print NF}' < delv.out.test$n`
   test "${f:-0}" -eq 4 || ret=1
index 86ab4a4463ce3c2b6a1a8dd7a169fa0d48c282b2..ce5287efc6c28c66a1c7891254c5e6587c173c69 100644 (file)
@@ -1278,7 +1278,7 @@ status=`expr $status + $ret`
 echo_i "checking reverse mapping ($n)"
 ret=0
 $DIG $DIGOPTS -x 2001:aaaa::10.0.0.1 @10.53.0.2 > dig.out.ns2.test$n || ret=1
-tr -d '\r' < dig.out.ns2.test$n | grep -i "CNAME.1.0.0.10.IN-ADDR.ARPA.$" > /dev/null || ret=1
+grep -i "CNAME.1.0.0.10.IN-ADDR.ARPA.$" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
 if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
index 90ee8876c21b4db01197a17afff121c5f254d1fa..647730e0be24f062bee290d7eabdfd4f879290c4 100644 (file)
@@ -229,7 +229,7 @@ do
 done
 serial=`awk '$3 == "serial" {print $1}' ns2/other.db`
 newserial=`expr $serial + 1`
-sed "s/$serial/$newserial/" ns2/other.db > ns2/other.db.new
+sed s/$serial/$newserial/ ns2/other.db > ns2/other.db.new
 echo 'frozen TXT "frozen addition"' >> ns2/other.db.new
 mv -f ns2/other.db.new ns2/other.db
 $RNDCCMD 10.53.0.2 thaw 2>&1 | sed 's/^/ns2 /' | cat_i
@@ -272,7 +272,7 @@ do
 done
 serial=`awk '$3 == "serial" {print $1}' ns2/nil.db`
 newserial=`expr $serial + 1`
-sed "s/$serial/$newserial/" ns2/nil.db > ns2/nil.db.new
+sed s/$serial/$newserial/ ns2/nil.db > ns2/nil.db.new
 echo 'frozen TXT "frozen addition"' >> ns2/nil.db.new
 mv -f ns2/nil.db.new ns2/nil.db
 $RNDCCMD 10.53.0.2 thaw 2>&1 | sed 's/^/ns2 /' | cat_i