Annotation of src/external/mpl/bind/dist/bin/tests/system/case/tests.sh, Revision 1.1.1.1.4.2
1.1.1.1.4.2! christos 1: #!/bin/sh
! 2: #
! 3: # Copyright (C) Internet Systems Consortium, Inc. ("ISC")
! 4: #
! 5: # This Source Code Form is subject to the terms of the Mozilla Public
! 6: # License, v. 2.0. If a copy of the MPL was not distributed with this
! 7: # file, You can obtain one at http://mozilla.org/MPL/2.0/.
! 8: #
! 9: # See the COPYRIGHT file distributed with this work for additional
! 10: # information regarding copyright ownership.
! 11:
! 12: SYSTEMTESTTOP=..
! 13: . $SYSTEMTESTTOP/conf.sh
! 14:
! 15: DIGOPTS="+tcp +nosea +nostat +noquest +nocomm +nocmd -p ${PORT}"
! 16:
! 17: status=0
! 18: n=0
! 19:
! 20: n=`expr $n + 1`
! 21: echo_i "waiting for zone transfer to complete ($n)"
! 22: ret=0
! 23: for i in 1 2 3 4 5 6 7 8 9
! 24: do
! 25: $DIG $DIGOPTS soa example. @10.53.0.2 > dig.ns2.test$n
! 26: grep SOA dig.ns2.test$n > /dev/null && break
! 27: sleep 1
! 28: done
! 29: for i in 1 2 3 4 5 6 7 8 9
! 30: do
! 31: $DIG $DIGOPTS soa dynamic. @10.53.0.2 > dig.ns2.test$n
! 32: grep SOA dig.ns2.test$n > /dev/null && break
! 33: sleep 1
! 34: done
! 35:
! 36: n=`expr $n + 1`
! 37: echo_i "testing case preserving responses - no acl ($n)"
! 38: ret=0
! 39: $DIG $DIGOPTS mx example. @10.53.0.1 > dig.ns1.test$n
! 40: grep "0.mail.eXaMpLe" dig.ns1.test$n > /dev/null || ret=1
! 41: grep "mAiL.example" dig.ns1.test$n > /dev/null || ret=1
! 42: test $ret -eq 0 || echo_i "failed"
! 43: status=`expr $status + $ret`
! 44:
! 45: n=`expr $n + 1`
! 46: echo_i "testing no-case-compress acl '{ 10.53.0.2; }' ($n)"
! 47: ret=0
! 48:
! 49: # check that we preserve zone case for non-matching query (10.53.0.1)
! 50: $DIG $DIGOPTS mx example. -b 10.53.0.1 @10.53.0.1 > dig.ns1.test$n
! 51: grep "0.mail.eXaMpLe" dig.ns1.test$n > /dev/null || ret=1
! 52: grep "mAiL.example" dig.ns1.test$n > /dev/null || ret=1
! 53:
! 54: # check that we don't preserve zone case for match (10.53.0.2)
! 55: $DIG $DIGOPTS mx example. -b 10.53.0.2 @10.53.0.2 > dig.ns2.test$n
! 56: grep "0.mail.example" dig.ns2.test$n > /dev/null || ret=1
! 57: grep "mail.example" dig.ns2.test$n > /dev/null || ret=1
! 58:
! 59: test $ret -eq 0 || echo_i "failed"
! 60: status=`expr $status + $ret`
! 61:
! 62: n=`expr $n + 1`
! 63: echo_i "testing load of dynamic zone with various \$ORIGIN values ($n)"
! 64: ret=0
! 65: $DIG $DIGOPTS axfr dynamic @10.53.0.1 > dig.ns1.test$n
! 66: digcomp dig.ns1.test$n dynamic.good || ret=1
! 67:
! 68: test $ret -eq 0 || echo_i "failed"
! 69: status=`expr $status + $ret`
! 70:
! 71: n=`expr $n + 1`
! 72: echo_i "transfer of dynamic zone with various \$ORIGIN values ($n)"
! 73: ret=0
! 74: $DIG $DIGOPTS axfr dynamic @10.53.0.2 > dig.ns2.test$n
! 75: digcomp dig.ns2.test$n dynamic.good || ret=1
! 76:
! 77: test $ret -eq 0 || echo_i "failed"
! 78: status=`expr $status + $ret`
! 79:
! 80: n=`expr $n + 1`
! 81: echo_i "change SOA owner case via update ($n)"
! 82: $NSUPDATE << EOF
! 83: server 10.53.0.1 ${PORT}
! 84: zone dynamic
! 85: update add dYNAMIc 0 SOA mname1. . 2000042408 20 20 1814400 3600
! 86: send
! 87: EOF
! 88: $DIG $DIGOPTS axfr dynamic @10.53.0.1 > dig.ns1.test$n
! 89: digcomp dig.ns1.test$n postupdate.good || ret=1
! 90:
! 91: test $ret -eq 0 || echo_i "failed"
! 92: status=`expr $status + $ret`
! 93:
! 94: for i in 1 2 3 4 5 6 7 8 9
! 95: do
! 96: $DIG $DIGOPTS soa dynamic @10.53.0.2 | grep 2000042408 > /dev/null && break
! 97: sleep 1
! 98: done
! 99:
! 100: n=`expr $n + 1`
! 101: echo_i "check SOA owner case is transfered to slave ($n)"
! 102: ret=0
! 103: $DIG $DIGOPTS axfr dynamic @10.53.0.2 > dig.ns2.test$n
! 104: digcomp dig.ns2.test$n postupdate.good || ret=1
! 105:
! 106: test $ret -eq 0 || echo_i "failed"
! 107: status=`expr $status + $ret`
! 108:
! 109: #update delete Ns1.DyNaMIC. 300 IN A 10.53.0.1
! 110: n=`expr $n + 1`
! 111: echo_i "change A record owner case via update ($n)"
! 112: $NSUPDATE << EOF
! 113: server 10.53.0.1 ${PORT}
! 114: zone dynamic
! 115: update add Ns1.DyNaMIC. 300 IN A 10.53.0.1
! 116: send
! 117: EOF
! 118: $DIG $DIGOPTS axfr dynamic @10.53.0.1 > dig.ns1.test$n
! 119: digcomp dig.ns1.test$n postns1.good || ret=1
! 120:
! 121: test $ret -eq 0 || echo_i "failed"
! 122: status=`expr $status + $ret`
! 123:
! 124: for i in 1 2 3 4 5 6 7 8 9
! 125: do
! 126: $DIG $DIGOPTS soa dynamic @10.53.0.2 | grep 2000042409 > /dev/null && break
! 127: sleep 1
! 128: done
! 129:
! 130: n=`expr $n + 1`
! 131: echo_i "check A owner case is transfered to slave ($n)"
! 132: ret=0
! 133: $DIG $DIGOPTS axfr dynamic @10.53.0.2 > dig.ns2.test$n
! 134: digcomp dig.ns2.test$n postns1.good || ret=1
! 135: status=`expr $status + $ret`
! 136:
! 137: echo_i "exit status: $status"
! 138: [ $status -eq 0 ] || exit 1
CVSweb <webmaster@jp.NetBSD.org>