]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
2392. [bug] remove 'grep -q' from acl test script, some platforms
authorTatuya JINMEI 神明達哉 <jinmei@isc.org>
Sat, 26 Jul 2008 19:03:35 +0000 (19:03 +0000)
committerTatuya JINMEI 神明達哉 <jinmei@isc.org>
Sat, 26 Jul 2008 19:03:35 +0000 (19:03 +0000)
don't support it. [RT #18253]

CHANGES
bin/tests/system/acl/tests.sh

diff --git a/CHANGES b/CHANGES
index 2241f42ce38864eb78e504ab8f413a236ce126f0..0452ebfb9d4c917e9fc9ebaf8dd99ba5e7e9c62d 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -16,6 +16,9 @@
                        open files to 'unlimited' as described in the
                        documentation. [RT #18331]
 
+2392.  [bug]           remove 'grep -q' from acl test script, some platforms
+                       don't support it. [RT #18253]
+
 2391   [port]          hpux: cover additional recvmsg() error codes.
                        [RT #18301]
 
index ab94005f280a86cbf42ba41232def9cc8c52423b..fa28f71182c09ec10ae64050874bed801d922b26 100644 (file)
@@ -14,7 +14,7 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: tests.sh,v 1.3.2.2 2008/01/11 23:45:30 tbox Exp $
+# $Id: tests.sh,v 1.3.2.3 2008/07/26 19:03:35 jinmei Exp $
 
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
@@ -29,13 +29,13 @@ echo "I:testing basic ACL processing"
 t=`expr $t + 1`
 $DIG $DIGOPTS tsigzone. \
        @10.53.0.2 -b 10.53.0.1 axfr -y one:1234abcd8765 -p 5300 > dig.out
-grep -q "^;" dig.out || { echo "I:test $t failed" ; status=1; }
+grep "^;" dig.out > /dev/null 2>&1 || { echo "I:test $t failed" ; status=1; }
 
 # any other key should be fine
 t=`expr $t + 1`
 $DIG $DIGOPTS tsigzone. \
        @10.53.0.2 -b 10.53.0.1 axfr -y two:1234abcd8765 -p 5300 > dig.out
-grep -q "^;" dig.out && { echo "I:test $t failed" ; status=1; }
+grep "^;" dig.out > /dev/null 2>&1 && { echo "I:test $t failed" ; status=1; }
 
 cp -f ns2/named2.conf ns2/named.conf
 $RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reload 2>&1 | sed 's/^/I:ns2 /'
@@ -45,18 +45,18 @@ sleep 5
 t=`expr $t + 1`
 $DIG $DIGOPTS tsigzone. \
        @10.53.0.2 -b 10.53.0.1 axfr -y one:1234abcd8765 -p 5300 > dig.out
-grep -q "^;" dig.out || { echo "I:test $t failed" ; status=1; }
+grep "^;" dig.out > /dev/null 2>&1 || { echo "I:test $t failed" ; status=1; }
 
 # any other address should work, as long as it sends key "one"
 t=`expr $t + 1`
 $DIG $DIGOPTS tsigzone. \
        @10.53.0.2 -b 127.0.0.1 axfr -y two:1234abcd8765 -p 5300 > dig.out
-grep -q "^;" dig.out || { echo "I:test $t failed" ; status=1; }
+grep "^;" dig.out > /dev/null 2>&1 || { echo "I:test $t failed" ; status=1; }
 
 t=`expr $t + 1`
 $DIG $DIGOPTS tsigzone. \
        @10.53.0.2 -b 127.0.0.1 axfr -y one:1234abcd8765 -p 5300 > dig.out
-grep -q "^;" dig.out && { echo "I:test $t failed" ; status=1; }
+grep "^;" dig.out > /dev/null 2>&1 && { echo "I:test $t failed" ; status=1; }
 
 echo "I:testing nested ACL processing"
 # all combinations of 10.53.0.{1|2} with key {one|two}, should succeed
@@ -68,42 +68,42 @@ sleep 5
 t=`expr $t + 1`
 $DIG $DIGOPTS tsigzone. \
        @10.53.0.2 -b 10.53.0.2 axfr -y two:1234abcd8765 -p 5300 > dig.out
-grep -q "^;" dig.out && { echo "I:test $t failed" ; status=1; }
+grep "^;" dig.out > /dev/null 2>&1 && { echo "I:test $t failed" ; status=1; }
 
 # should succeed
 t=`expr $t + 1`
 $DIG $DIGOPTS tsigzone. \
        @10.53.0.2 -b 10.53.0.2 axfr -y one:1234abcd8765 -p 5300 > dig.out
-grep -q "^;" dig.out && { echo "I:test $t failed" ; status=1; }
+grep "^;" dig.out > /dev/null 2>&1 && { echo "I:test $t failed" ; status=1; }
 
 # should succeed
 t=`expr $t + 1`
 $DIG $DIGOPTS tsigzone. \
        @10.53.0.2 -b 10.53.0.1 axfr -y two:1234abcd8765 -p 5300 > dig.out
-grep -q "^;" dig.out && { echo "I:test $t failed" ; status=1; }
+grep "^;" dig.out > /dev/null 2>&1 && { echo "I:test $t failed" ; status=1; }
 
 # should succeed
 t=`expr $t + 1`
 $DIG $DIGOPTS tsigzone. \
        @10.53.0.2 -b 10.53.0.1 axfr -y two:1234abcd8765 -p 5300 > dig.out
-grep -q "^;" dig.out && { echo "I:test $t failed" ; status=1; }
+grep "^;" dig.out > /dev/null 2>&1 && { echo "I:test $t failed" ; status=1; }
 
 # but only one or the other should fail
 t=`expr $t + 1`
 $DIG $DIGOPTS tsigzone. \
        @10.53.0.2 -b 127.0.0.1 axfr -y one:1234abcd8765 -p 5300 > dig.out
-grep -q "^;" dig.out || { echo "I:test $t failed" ; status=1; }
+grep "^;" dig.out > /dev/null 2>&1 || { echo "I:test $t failed" ; status=1; }
 
 t=`expr $t + 1`
 $DIG $DIGOPTS tsigzone. \
        @10.53.0.2 -b 10.53.0.2 axfr -p 5300 > dig.out
-grep -q "^;" dig.out || { echo "I:test $tt failed" ; status=1; }
+grep "^;" dig.out > /dev/null 2>&1 || { echo "I:test $tt failed" ; status=1; }
 
 # and other values? right out
 t=`expr $t + 1`
 $DIG $DIGOPTS tsigzone. \
        @10.53.0.2 -b 127.0.0.1 axfr -y three:1234abcd8765 -p 5300 > dig.out
-grep -q "^;" dig.out || { echo "I:test $t failed" ; status=1; }
+grep "^;" dig.out > /dev/null 2>&1 || { echo "I:test $t failed" ; status=1; }
 
 # now we only allow 10.53.0.1 *and* key one, or 10.53.0.2 *and* key two
 cp -f ns2/named4.conf ns2/named.conf
@@ -114,31 +114,31 @@ sleep 5
 t=`expr $t + 1`
 $DIG $DIGOPTS tsigzone. \
        @10.53.0.2 -b 10.53.0.2 axfr -y two:1234abcd8765 -p 5300 > dig.out
-grep -q "^;" dig.out && { echo "I:test $t failed" ; status=1; }
+grep "^;" dig.out > /dev/null 2>&1 && { echo "I:test $t failed" ; status=1; }
 
 # should succeed
 t=`expr $t + 1`
 $DIG $DIGOPTS tsigzone. \
        @10.53.0.2 -b 10.53.0.1 axfr -y one:1234abcd8765 -p 5300 > dig.out
-grep -q "^;" dig.out && { echo "I:test $t failed" ; status=1; }
+grep "^;" dig.out > /dev/null 2>&1 && { echo "I:test $t failed" ; status=1; }
 
 # should fail
 t=`expr $t + 1`
 $DIG $DIGOPTS tsigzone. \
        @10.53.0.2 -b 10.53.0.2 axfr -y one:1234abcd8765 -p 5300 > dig.out
-grep -q "^;" dig.out || { echo "I:test $t failed" ; status=1; }
+grep "^;" dig.out > /dev/null 2>&1 || { echo "I:test $t failed" ; status=1; }
 
 # should fail
 t=`expr $t + 1`
 $DIG $DIGOPTS tsigzone. \
        @10.53.0.2 -b 10.53.0.1 axfr -y two:1234abcd8765 -p 5300 > dig.out
-grep -q "^;" dig.out || { echo "I:test $t failed" ; status=1; }
+grep "^;" dig.out > /dev/null 2>&1 || { echo "I:test $t failed" ; status=1; }
 
 # should fail
 t=`expr $t + 1`
 $DIG $DIGOPTS tsigzone. \
        @10.53.0.2 -b 10.53.0.3 axfr -y one:1234abcd8765 -p 5300 > dig.out
-grep -q "^;" dig.out || { echo "I:test $t failed" ; status=1; }
+grep "^;" dig.out > /dev/null 2>&1 || { echo "I:test $t failed" ; status=1; }
 
 echo "I:exit status: $status"
 exit $status