diff options
author | Martin Nagy <mnagy@redhat.com> | 2008-12-09 19:31:51 +0100 |
---|---|---|
committer | Martin Nagy <mnagy@redhat.com> | 2008-12-09 19:31:51 +0100 |
commit | 9b941ce45484431bf095ffc39f242e81c716cbd5 (patch) | |
tree | 5e9fb4d5945e88d78d61591cdd803e8174520f81 /bin/tests/system/xferquota | |
download | bind_dynamic-9b941ce45484431bf095ffc39f242e81c716cbd5.tar.gz bind_dynamic-9b941ce45484431bf095ffc39f242e81c716cbd5.tar.xz bind_dynamic-9b941ce45484431bf095ffc39f242e81c716cbd5.zip |
Initial import.bind-9-6-0-rc1
Diffstat (limited to 'bin/tests/system/xferquota')
-rw-r--r-- | bin/tests/system/xferquota/clean.sh | 28 | ||||
-rw-r--r-- | bin/tests/system/xferquota/ns1/changing1.db | 33 | ||||
-rw-r--r-- | bin/tests/system/xferquota/ns1/changing2.db | 33 | ||||
-rw-r--r-- | bin/tests/system/xferquota/ns1/named.conf | 44 | ||||
-rw-r--r-- | bin/tests/system/xferquota/ns1/root.db | 35 | ||||
-rw-r--r-- | bin/tests/system/xferquota/ns2/example.db | 152 | ||||
-rw-r--r-- | bin/tests/system/xferquota/ns2/named.conf | 48 | ||||
-rw-r--r-- | bin/tests/system/xferquota/setup.pl | 46 | ||||
-rw-r--r-- | bin/tests/system/xferquota/setup.sh | 26 | ||||
-rw-r--r-- | bin/tests/system/xferquota/tests.sh | 71 |
10 files changed, 516 insertions, 0 deletions
diff --git a/bin/tests/system/xferquota/clean.sh b/bin/tests/system/xferquota/clean.sh new file mode 100644 index 0000000..9ca8830 --- /dev/null +++ b/bin/tests/system/xferquota/clean.sh @@ -0,0 +1,28 @@ +#!/bin/sh +# +# Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC") +# Copyright (C) 2000, 2001 Internet Software Consortium. +# +# 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: clean.sh,v 1.14 2007/09/26 03:22:44 marka Exp $ + +# +# Clean up after zone transfer quota tests. +# + +rm -f ns1/zone*.example.db ns1/zones.conf +rm -f ns2/zone*.example.bk ns2/zones.conf +rm -f dig.out.* ns2/changing.bk +rm -f ns1/changing.db +rm -f */named.memstats diff --git a/bin/tests/system/xferquota/ns1/changing1.db b/bin/tests/system/xferquota/ns1/changing1.db new file mode 100644 index 0000000..70b9016 --- /dev/null +++ b/bin/tests/system/xferquota/ns1/changing1.db @@ -0,0 +1,33 @@ +; Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC") +; Copyright (C) 2000, 2001 Internet Software Consortium. +; +; 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: changing1.db,v 1.10 2007/06/19 23:47:07 tbox Exp $ + +$TTL 600 + +@ IN SOA dns1.changing. postmaster.changing. ( + 1 ;; serial + 3600 ;; refresh period + 1800 ;; retry interval + 604800 ;; expire time + 600 ) ;; default TTL + + IN NS dns1.changing. + NS dns2.changing. + +dns1 IN A 10.53.0.1 +dns2 IN A 10.53.0.2 + +a IN A 10.0.0.1 diff --git a/bin/tests/system/xferquota/ns1/changing2.db b/bin/tests/system/xferquota/ns1/changing2.db new file mode 100644 index 0000000..bcf73e0 --- /dev/null +++ b/bin/tests/system/xferquota/ns1/changing2.db @@ -0,0 +1,33 @@ +; Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC") +; Copyright (C) 2000, 2001 Internet Software Consortium. +; +; 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: changing2.db,v 1.10 2007/06/19 23:47:07 tbox Exp $ + +$TTL 600 + +@ IN SOA dns1.changing. postmaster.changing. ( + 2 ;; serial + 3600 ;; refresh period + 1800 ;; retry interval + 604800 ;; expire time + 600 ) ;; default TTL + + IN NS dns1.changing. + NS dns2.changing. + +dns1 IN A 10.53.0.1 +dns2 IN A 10.53.0.2 + +a IN A 10.0.0.2 diff --git a/bin/tests/system/xferquota/ns1/named.conf b/bin/tests/system/xferquota/ns1/named.conf new file mode 100644 index 0000000..a49e790 --- /dev/null +++ b/bin/tests/system/xferquota/ns1/named.conf @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2000, 2001 Internet Software Consortium. + * + * 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: named.conf,v 1.21 2007/06/19 23:47:07 tbox Exp $ */ + +controls { /* empty */ }; + +options { + query-source address 10.53.0.1; + notify-source 10.53.0.1; + transfer-source 10.53.0.1; + port 5300; + pid-file "named.pid"; + listen-on { 10.53.0.1; }; + listen-on-v6 { none; }; + recursion no; + notify yes; +}; + +zone "." { + type master; + file "root.db"; +}; + +zone "changing." { + type master; + file "changing.db"; +}; + +include "zones.conf"; diff --git a/bin/tests/system/xferquota/ns1/root.db b/bin/tests/system/xferquota/ns1/root.db new file mode 100644 index 0000000..beca386 --- /dev/null +++ b/bin/tests/system/xferquota/ns1/root.db @@ -0,0 +1,35 @@ +; Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC") +; Copyright (C) 2000, 2001 Internet Software Consortium. +; +; 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: root.db,v 1.10 2007/06/19 23:47:07 tbox Exp $ + +$TTL 300 +. IN SOA gson.nominum.com. a.root.servers.nil. ( + 2000042100 ; serial + 600 ; refresh + 600 ; retry + 1200 ; expire + 600 ; minimum + ) +. NS a.root-servers.nil. +a.root-servers.nil. A 10.53.0.1 + +example. NS ns2.example. +ns2.example. A 10.53.0.2 + +changing. NS dns1.changing. + A 10.53.0.1 + NS dns2.changing. + A 10.53.0.2 diff --git a/bin/tests/system/xferquota/ns2/example.db b/bin/tests/system/xferquota/ns2/example.db new file mode 100644 index 0000000..8e5a7be --- /dev/null +++ b/bin/tests/system/xferquota/ns2/example.db @@ -0,0 +1,152 @@ +; Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC") +; Copyright (C) 2000-2003 Internet Software Consortium. +; +; 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: example.db,v 1.12 2007/06/19 23:47:07 tbox Exp $ + +$ORIGIN . +$TTL 300 ; 5 minutes +example IN SOA mname1. . ( + 2000042795 ; serial + 20 ; refresh (20 seconds) + 20 ; retry (20 seconds) + 1814400 ; expire (3 weeks) + 3600 ; minimum (1 hour) + ) +example. NS ns2.example. +ns2.example. A 10.53.0.2 +example. NS ns3.example. +ns3.example. A 10.53.0.3 + +$ORIGIN example. +* MX 10 mail +a TXT "foo foo foo" + PTR foo.net. +$TTL 3600 ; 1 hour +a01 A 0.0.0.0 +a02 A 255.255.255.255 +a601 AAAA ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff +afsdb01 AFSDB 0 hostname +afsdb02 AFSDB 65535 . +$TTL 300 ; 5 minutes +b CNAME foo.net. +c A 73.80.65.49 +$TTL 3600 ; 1 hour +cert01 CERT 65534 65535 PRIVATEOID ( + MxFcby9k/yvedMfQgKzhH5er0Mu/vILz45IkskceFGgi + WCn/GxHhai6VAuHAoNUz4YoU1tVfSCSqQYn6//11U6Nl + d80jEeC8aTrO+KKmCaY= ) +cname01 CNAME cname-target. +cname02 CNAME cname-target +cname03 CNAME . +$TTL 300 ; 5 minutes +d A 73.80.65.49 +$TTL 3600 ; 1 hour +dname01 DNAME dname-target. +dname02 DNAME dname-target +dname03 DNAME . +$TTL 300 ; 5 minutes +e MX 10 mail + TXT "one" + TXT "three" + TXT "two" + A 73.80.65.49 + A 73.80.65.50 + A 73.80.65.52 + A 73.80.65.51 +f A 73.80.65.52 +$TTL 3600 ; 1 hour +gpos01 GPOS "-22.6882" "116.8652" "250.0" +gpos02 GPOS "" "" "" +hinfo01 HINFO "Generic PC clone" "NetBSD-1.4" +hinfo02 HINFO "PC" "NetBSD" +isdn01 ISDN "isdn-address" +isdn02 ISDN "isdn-address" "subaddress" +isdn03 ISDN "isdn-address" +isdn04 ISDN "isdn-address" "subaddress" +dnskey01 DNSKEY 512 255 1 ( + AQMFD5raczCJHViKtLYhWGz8hMY9UGRuniJDBzC7w0aR + yzWZriO6i2odGWWQVucZqKVsENW91IOW4vqudngPZsY3 + GvQ/xVA8/7pyFj6b7Esga60zyGW6LFe9r8n6paHrlG5o + jqf0BaqHT+8= ) +kx01 KX 10 kdc +kx02 KX 10 . +loc01 LOC 60 9 0.000 N 24 39 0.000 E 10.00m 20m 2000m 20m +loc02 LOC 60 9 0.000 N 24 39 0.000 E 10.00m 20m 2000m 20m +mb01 MG madname +mb02 MG . +mg01 MG mgmname +mg02 MG . +minfo01 MINFO rmailbx emailbx +minfo02 MINFO . . +mr01 MR mrname +mr02 MR . +mx01 MX 10 mail +mx02 MX 10 . +naptr01 NAPTR 0 0 "" "" "" . +naptr02 NAPTR 65535 65535 "blurgh" "blorf" "blegh" foo. +nsap-ptr01 NSAP-PTR foo. + NSAP-PTR . +nsap01 NSAP 0x47000580005a0000000001e133ffffff00016100 +nsap02 NSAP 0x47000580005a0000000001e133ffffff00016100 +nsec01 NSEC a.secure ( NS SOA MX RRSIG DNSKEY LOC NSEC ) +nsec02 NSEC . ( NSAP-PTR NSEC ) +nsec03 NSEC . ( A ) +nsec04 NSEC . ( 127 ) +ptr01 PTR example. +px01 PX 65535 foo. bar. +px02 PX 65535 . . +rp01 RP mbox-dname txt-dname +rp02 RP . . +rt01 RT 0 intermediate-host +rt02 RT 65535 . +$TTL 300 ; 5 minutes +s NS ns.s +$ORIGIN s.example. +ns A 73.80.65.49 +$ORIGIN example. +$TTL 3600 ; 1 hour +rrsig01 RRSIG NSEC 1 3 3600 20000102030405 ( + 19961211100908 2143 foo + MxFcby9k/yvedMfQgKzhH5er0Mu/vILz45IkskceFGgi + WCn/GxHhai6VAuHAoNUz4YoU1tVfSCSqQYn6//11U6Nl + d80jEeC8aTrO+KKmCaY= ) +srv01 SRV 0 0 0 . +srv02 SRV 65535 65535 65535 old-slow-box.example.com. +$TTL 301 ; 5 minutes 1 second +t A 73.80.65.49 +$TTL 3600 ; 1 hour +txt01 TXT "foo" +txt02 TXT "foo" "bar" +txt03 TXT "foo" +txt04 TXT "foo" "bar" +txt05 TXT "foo bar" +txt06 TXT "foo bar" +txt07 TXT "foo bar" +txt08 TXT "foo\010bar" +txt09 TXT "foo\010bar" +txt10 TXT "foo bar" +txt11 TXT "\"foo\"" +txt12 TXT "\"foo\"" +$TTL 300 ; 5 minutes +u TXT "txt-not-in-nsec" +$ORIGIN u.example. +a A 73.80.65.49 +b A 73.80.65.49 +$ORIGIN example. +$TTL 3600 ; 1 hour +wks01 WKS 10.0.0.1 6 ( 0 1 2 21 23 ) +wks02 WKS 10.0.0.1 17 ( 0 1 2 53 ) +wks03 WKS 10.0.0.2 6 ( 65535 ) +x2501 X25 "123456789" diff --git a/bin/tests/system/xferquota/ns2/named.conf b/bin/tests/system/xferquota/ns2/named.conf new file mode 100644 index 0000000..5930eea --- /dev/null +++ b/bin/tests/system/xferquota/ns2/named.conf @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2000, 2001 Internet Software Consortium. + * + * 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: named.conf,v 1.22 2007/06/19 23:47:07 tbox Exp $ */ + +controls { /* empty */ }; + +options { + query-source address 10.53.0.2; + notify-source 10.53.0.2; + transfer-source 10.53.0.2; + port 5300; + pid-file "named.pid"; + listen-on { 10.53.0.2; }; + listen-on-v6 { none; }; + recursion no; + notify no; + + transfers-in 5; + transfers-per-ns 5; +}; + +zone "." { + type hint; + file "../../common/root.hint"; +}; + +zone "changing." { + type slave; + masters { 10.53.0.1; }; + file "changing.bk"; +}; + +include "zones.conf"; diff --git a/bin/tests/system/xferquota/setup.pl b/bin/tests/system/xferquota/setup.pl new file mode 100644 index 0000000..19ed4e8 --- /dev/null +++ b/bin/tests/system/xferquota/setup.pl @@ -0,0 +1,46 @@ +#!/usr/bin/perl +# +# Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC") +# Copyright (C) 2000, 2001 Internet Software Consortium. +# +# 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: setup.pl,v 1.14 2007/06/19 23:47:07 tbox Exp $ + +# +# Set up test data for zone transfer quota tests. +# +use FileHandle; + +my $masterconf = new FileHandle("ns1/zones.conf", "w") or die; +my $slaveconf = new FileHandle("ns2/zones.conf", "w") or die; + +for ($z = 0; $z < 300; $z++) { + my $zn = sprintf("zone%06d.example", $z); + print $masterconf "zone \"$zn\" { type master; file \"$zn.db\"; };\n"; + print $slaveconf "zone \"$zn\" { type slave; file \"$zn.bk\"; masters { 10.53.0.1; }; };\n"; + my $fn = "ns1/$zn.db"; + my $f = new FileHandle($fn, "w") or die "open: $fn: $!"; + print $f "\$TTL 300 +\@ IN SOA ns1 . 1 300 120 3600 86400 + NS ns1 + NS ns2 +ns1 A 10.53.0.1 +ns2 A 10.53.0.2 + MX 10 mail1.isp.example. + MX 20 mail2.isp.example. +www A 10.0.0.1 +xyzzy A 10.0.0.2 +"; + $f->close; +} diff --git a/bin/tests/system/xferquota/setup.sh b/bin/tests/system/xferquota/setup.sh new file mode 100644 index 0000000..d45cc88 --- /dev/null +++ b/bin/tests/system/xferquota/setup.sh @@ -0,0 +1,26 @@ +#!/bin/sh +# +# Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC") +# Copyright (C) 2000, 2001 Internet Software Consortium. +# +# 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: setup.sh,v 1.15 2007/06/19 23:47:07 tbox Exp $ + +# +# Set up test data for zone transfer quota tests. +# + +$PERL setup.pl + +cp -f ns1/changing1.db ns1/changing.db diff --git a/bin/tests/system/xferquota/tests.sh b/bin/tests/system/xferquota/tests.sh new file mode 100644 index 0000000..9d077e5 --- /dev/null +++ b/bin/tests/system/xferquota/tests.sh @@ -0,0 +1,71 @@ +#!/bin/sh +# +# Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC") +# Copyright (C) 2000, 2001 Internet Software Consortium. +# +# 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.25 2007/06/19 23:47:07 tbox Exp $ + +SYSTEMTESTTOP=.. +. $SYSTEMTESTTOP/conf.sh + +# +# Perform tests +# + +count=0 +ticks=0 +while [ $count != 300 ]; do + if [ $ticks = 1 ]; then + echo "I:Changing test zone..." + cp -f ns1/changing2.db ns1/changing.db + kill -HUP `cat ns1/named.pid` + fi + sleep 1 + ticks=`expr $ticks + 1` + seconds=`expr $ticks \* 1` + if [ $ticks = 360 ]; then + echo "I:Took too long to load zones" + exit 1 + fi + count=`cat ns2/zone*.bk | grep xyzzy | wc -l` + echo "I:Have $count zones up in $seconds seconds" +done + +status=0 + +$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd \ + zone000099.example. @10.53.0.1 axfr -p 5300 > dig.out.ns1 || status=1 +grep ";" dig.out.ns1 + +$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd \ + zone000099.example. @10.53.0.2 axfr -p 5300 > dig.out.ns2 || status=1 +grep ";" dig.out.ns2 + +$PERL ../digcomp.pl dig.out.ns1 dig.out.ns2 || status=1 + +sleep 15 + +$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd \ + a.changing. @10.53.0.1 a -p 5300 > dig.out.ns1 || status=1 +grep ";" dig.out.ns1 + +$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd \ + a.changing. @10.53.0.2 a -p 5300 > dig.out.ns2 || status=1 +grep ";" dig.out.ns2 + +$PERL ../digcomp.pl dig.out.ns1 dig.out.ns2 || status=1 + +echo "I:exit status: $status" +exit $status |