Commit 06cae983 authored by Curtis Blackburn's avatar Curtis Blackburn Committed by Evan Hunt
Browse files

digdelv test fixed for CRLF issue

(cherry picked from commit ba1b9ca4)
parent e0ab5603
......@@ -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
grep "10\.0\.0\.1$" < dig.out.test$n > /dev/null || ret=1
tr -d '\r' < dig.out.test$n | grep "10\\.0\\.0\\.1$" > /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
grep "S8M= ; ZSK; alg = RSAMD5 ; key id = 30795$" < dig.out.test$n > /dev/null || ret=1
tr -d '\r' < dig.out.test$n | grep -q "S8M= ; ZSK; alg = RSAMD5 ; key id = 30795$" > /dev/null || ret=1
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
......@@ -135,7 +135,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
grep "S8M= ; ZSK; alg = RSAMD5 ; key id = 30795$" < dig.out.test$n > /dev/null || ret=1
tr -d '\r' < dig.out.test$n | grep -q "S8M= ; ZSK; alg = RSAMD5 ; key id = 30795$" > /dev/null || ret=1
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
......@@ -434,7 +434,7 @@ if [ -x ${DIG} ] ; then
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
grep "; KEY-TAG$" dig.out.test$n > /dev/null || ret=1
tr -d '\r' < dig.out.test$n | grep "; KEY-TAG$" > /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`
......@@ -443,6 +443,7 @@ if [ -x ${DIG} ] ; then
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
grep "; KEY-TAG: 1, 2$" dig.out.test$n > /dev/null || ret=1
tr -d '\r' < dig.out.test$n | grep "; KEY-TAG: 1, 2$" > /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`
......@@ -586,7 +587,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
grep "10\.0\.0\.1$" < delv.out.test$n > /dev/null || ret=1
tr -d '\r' < delv.out.test$n | grep "10\\.0\\.0\\.1$" > /dev/null || ret=1
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
......@@ -645,7 +646,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
grep "Z8plc4Rb9VIE5x7KNHAYTvTO5d4S8M=$" < delv.out.test$n > /dev/null || ret=1
tr -d '\r' < delv.out.test$n | grep -q "$NOSPLIT\$" > /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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment