3180. [func] Local copies of slave zones are now saved in raw

format by default, to improve startup performance.
			'masterfile-format text;' can be used to override
			the default, if desired. [RT #25867]
This commit is contained in:
Evan Hunt
2011-10-26 15:23:37 +00:00
parent f4ee3d9741
commit 9570ddcd41
11 changed files with 139 additions and 57 deletions

View File

@@ -1,46 +1,6 @@
#!/bin/sh
#
# Copyright (C) 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# $Id: tests.sh,v 1.4 2007/06/19 23:47:04 tbox Exp $
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
DIGOPTS="+tcp +noauth +noadd +nosea +nostat +noquest +nocomm +nocmd"
status=0
echo "I:checking that master file in the raw format worked"
for server in 1 2
do
for name in ns mx a aaaa cname dname txt rrsig nsec dnskey ds
do
$DIG $DIGOPTS $name.example. $name @10.53.0.$server -p 5300
echo
done > dig.out.$server
done
diff dig.out.1 dig.out.2 || status=1
echo "I:exit status: $status"
exit $status
#!/bin/sh
#
# Copyright (C) 2005 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 2005, 2007, 2011 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
@@ -54,17 +14,24 @@ exit $status
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# $Id: tests.sh,v 1.4 2007/06/19 23:47:04 tbox Exp $
# $Id: tests.sh,v 1.5 2011/10/26 15:23:36 each Exp $
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
israw () {
cat $1 | perl -e '$input = <STDIN>;
($style, $version) = unpack("NN", $input);
exit 1 if ($style != 2 || $version != 0);'
return $?
}
DIGOPTS="+tcp +noauth +noadd +nosea +nostat +noquest +nocomm +nocmd"
status=0
echo "I:checking that master file in the raw format worked"
ret=0
for server in 1 2
do
for name in ns mx a aaaa cname dname txt rrsig nsec dnskey ds
@@ -73,8 +40,30 @@ do
echo
done > dig.out.$server
done
$PERL ../digcomp.pl dig.out.1 dig.out.2 || ret=1
[ $ret -eq 0 ] || echo "I:failed"
status=`expr $status + $ret`
diff dig.out.1 dig.out.2 || status=1
echo "I:waiting for transfers to complete"
sleep 1
echo "I:checking that slave was saved in raw format by default"
ret=0
israw ns2/transfer.db.raw || ret=1
[ $ret -eq 0 ] || echo "I:failed"
status=`expr $status + $ret`
echo "I:checking that slave was saved in text format when configured"
ret=0
israw ns2/transfer.db.txt && ret=1
[ $ret -eq 0 ] || echo "I:failed"
status=`expr $status + $ret`
echo "I:checking that slave formerly in text format is now raw"
ret=0
israw ns2/formerly-text.db || ret=1
[ $ret -eq 0 ] || echo "I:failed"
status=`expr $status + $ret`
echo "I:exit status: $status"
exit $status