1# Copyright (C) 2011 Internet Systems Consortium, Inc. ("ISC") 2# 3# Permission to use, copy, modify, and/or distribute this software for any 4# purpose with or without fee is hereby granted, provided that the above 5# copyright notice and this permission notice appear in all copies. 6# 7# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH 8# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 9# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, 10# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 11# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 12# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 13# PERFORMANCE OF THIS SOFTWARE. 14 15# $Id: tests.sh,v 1.2.2.3 2011/08/09 04:11:44 tbox Exp $ 16 17status=0 18n=0 19 20n=`expr $n + 1` 21echo "I:Checking that reconfiguring empty zones is silent ($n)" 22$RNDC -c ../common/rndc.conf -s 10.53.0.1 -p 9953 reconfig 23ret=0 24grep "automatic empty zone" ns1/named.run > /dev/null || ret=1 25grep "received control channel command 'reconfig'" ns1/named.run > /dev/null || ret=1 26grep "reloading configuration succeeded" ns1/named.run > /dev/null || ret=1 27sleep 1 28grep "zone serial (0) unchanged." ns1/named.run > /dev/null && ret=1 29if [ $ret != 0 ] ; then echo I:failed; status=`expr $status + $ret`; fi 30 31n=`expr $n + 1` 32echo "I:Checking that reloading empty zones is silent ($n)" 33$RNDC -c ../common/rndc.conf -s 10.53.0.1 -p 9953 reload > /dev/null 34ret=0 35grep "automatic empty zone" ns1/named.run > /dev/null || ret=1 36grep "received control channel command 'reload'" ns1/named.run > /dev/null || ret=1 37grep "reloading configuration succeeded" ns1/named.run > /dev/null || ret=1 38sleep 1 39grep "zone serial (0) unchanged." ns1/named.run > /dev/null && ret=1 40if [ $ret != 0 ] ; then echo I:failed; status=`expr $status + $ret`; fi 41 42exit $status 43