From 37176663e0fed1fa5f01151d631b9ea551fcd270 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Wed, 17 Feb 2016 13:17:40 +1100 Subject: [PATCH] don't used class in grep e.g. [:space:] --- bin/tests/system/digdelv/tests.sh | 14 +++++++------- bin/tests/system/mkeys/tests.sh | 4 ++-- bin/tests/system/rpzrecurse/tests.sh | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/bin/tests/system/digdelv/tests.sh b/bin/tests/system/digdelv/tests.sh index c6ff66b4b0..4c2d8e168f 100644 --- a/bin/tests/system/digdelv/tests.sh +++ b/bin/tests/system/digdelv/tests.sh @@ -41,7 +41,7 @@ if [ -x ${DIG} ] ; then echo "I:checking dig +unknownformat works ($n)" ret=0 $DIG $DIGOPTS @10.53.0.3 +unknownformat a a.example > dig.out.test$n || ret=1 - grep "CLASS1[[:space:]][[:space:]]*TYPE1[[:space:]][[:space:]]*\\\\# 4 0A000001" < dig.out.test$n > /dev/null || ret=1 + grep "CLASS1[ ][ ]*TYPE1[ ][ ]*\\\\# 4 0A000001" < dig.out.test$n > /dev/null || ret=1 if [ $ret != 0 ]; then echo "I:failed"; fi status=`expr $status + $ret` @@ -198,7 +198,7 @@ if [ -x ${DIG} ] ; then n=`expr $n + 1` echo "I:checking dig @IPv6addr -4 A a.example ($n)" - if $TESTSOCK6 fd92:7065:b8e:ffff::2 + if $TESTSOCK6 fd92:7065:b8e:ffff::2 2>/dev/null then ret=0 $DIG $DIGOPTS +tcp @fd92:7065:b8e:ffff::2 -4 A a.example > dig.out.test$n 2>&1 && ret=1 @@ -211,7 +211,7 @@ if [ -x ${DIG} ] ; then n=`expr $n + 1` echo "I:checking dig @IPv4addr -6 +mapped A a.example ($n)" - if $TESTSOCK6 fd92:7065:b8e:ffff::2 + if $TESTSOCK6 fd92:7065:b8e:ffff::2 2>/dev/null then ret=0 ret=0 @@ -225,7 +225,7 @@ if [ -x ${DIG} ] ; then n=`expr $n + 1` echo "I:checking dig +tcp @IPv4addr -6 +nomapped A a.example ($n)" - if $TESTSOCK6 fd92:7065:b8e:ffff::2 + if $TESTSOCK6 fd92:7065:b8e:ffff::2 2>/dev/null then ret=0 ret=0 @@ -239,7 +239,7 @@ if [ -x ${DIG} ] ; then n=`expr $n + 1` echo "I:checking dig +notcp @IPv4addr -6 +nomapped A a.example ($n)" - if $TESTSOCK6 fd92:7065:b8e:ffff::2 + if $TESTSOCK6 fd92:7065:b8e:ffff::2 2>/dev/null then ret=0 ret=0 @@ -349,13 +349,13 @@ if [ -x ${DELV} ] ; then echo "I:checking delv +unknownformat works ($n)" ret=0 $DELV $DELVOPTS @10.53.0.3 +unknownformat a a.example > delv.out.test$n || ret=1 - grep "CLASS1[[:space:]][[:space:]]*TYPE1[[:space:]][[:space:]]*\\\\# 4 0A000001" < delv.out.test$n > /dev/null || ret=1 + grep "CLASS1[ ][ ]*TYPE1[ ][ ]*\\\\# 4 0A000001" < delv.out.test$n > /dev/null || ret=1 if [ $ret != 0 ]; then echo "I:failed"; fi status=`expr $status + $ret` n=`expr $n + 1` echo "I:checking delv with IPv6 on IPv4 does not work ($n)" - if $TESTSOCK6 fd92:7065:b8e:ffff::3 + if $TESTSOCK6 fd92:7065:b8e:ffff::3 2>/dev/null then ret=0 # following should fail because @IPv4 overrides earlier @IPv6 above diff --git a/bin/tests/system/mkeys/tests.sh b/bin/tests/system/mkeys/tests.sh index f734988e4e..c66fadde30 100644 --- a/bin/tests/system/mkeys/tests.sh +++ b/bin/tests/system/mkeys/tests.sh @@ -28,8 +28,8 @@ DELVOPTS="-a ns1/trusted.conf -p 5300" echo "I: check for signed record ($n)" ret=0 $DIG $DIGOPTS +norec example. @10.53.0.1 TXT > dig.out.ns1.test$n || ret=1 -grep "^example\.[[:space:]]*[0-9].*[[:space:]]*IN[[:space:]]*TXT[[:space:]]*\"This is a test\.\"" dig.out.ns1.test$n > /dev/null || ret=1 -grep "^example\.[[:space:]]*[0-9].*[[:space:]]*IN[[:space:]]*RRSIG[[:space:]]*TXT[[:space:]]" dig.out.ns1.test$n > /dev/null || ret=1 +grep "^example\.[ ]*[0-9].*[ ]*IN[ ]*TXT[ ]*\"This is a test\.\"" dig.out.ns1.test$n > /dev/null || ret=1 +grep "^example\.[ ]*[0-9].*[ ]*IN[ ]*RRSIG[ ]*TXT[ ]" dig.out.ns1.test$n > /dev/null || ret=1 if [ $ret != 0 ]; then echo "I:failed"; fi status=`expr $status + $ret` diff --git a/bin/tests/system/rpzrecurse/tests.sh b/bin/tests/system/rpzrecurse/tests.sh index 23145f4bb8..c5bfb66b42 100644 --- a/bin/tests/system/rpzrecurse/tests.sh +++ b/bin/tests/system/rpzrecurse/tests.sh @@ -240,7 +240,7 @@ grep "status: NOERROR" dig.out.${t} > /dev/null 2>&1 || { echo "I:test $t failed: query failed" status=1 } -grep "^l2.l1.l0.[[:space:]]*[0-9]*[[:space:]]*IN[[:space:]]*A[[:space:]]*10.53.0.2" dig.out.${t} > /dev/null 2>&1 || { +grep "^l2.l1.l0.[ ]*[0-9]*[ ]*IN[ ]*A[ ]*10.53.0.2" dig.out.${t} > /dev/null 2>&1 || { echo "I:test $t failed: didn't get expected answer" status=1 }