Browse Source

[1213] Address comments on scripts and configuration files.

Stephen Morris 13 years ago
parent
commit
0fc1386138

+ 25 - 0
tests/system/ixfr/clean.sh

@@ -0,0 +1,25 @@
+#!/bin/sh
+#
+# Copyright (C) 2004, 2007, 2011  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.
+
+# Clean up after zone transfer tests.
+
+rm -f ns1/named.conf
+rm -f ns1/zone.db
+rm -f ns1/named.memstats
+
+rm -f nsx2/bind10.run
+rm -f nsx2/zone.sqlite3

+ 2 - 12
tests/system/ixfr/common_tests.sh.in

@@ -50,7 +50,7 @@
 . @abs_top_builddir@/tests/system/conf.sh
 . $IXFR_TOP/ixfr_init.sh
 
-status=0
+set -e
 
 # Store the SOA serial number of the BIND 10 client for later use.
 old_client_serial=`$DIG_SOA @$CLIENT_IP | $AWK '{print $3}'`
@@ -61,13 +61,11 @@ echo "I:SOA serial of IXFR client $CLIENT_NAME is $old_client_serial"
 # generate the differences between them.
 echo "I:updating IXFR-server $SERVER_NAME for ixfr-in tests"
 update_server_zone $SERVER_NAME $SERVER_IP $IXFR_TOP/largezone_n-2.db
-status=`expr $status + $?`
 
 # Wait a bit - it seems that if two updates are loaded in quick succession,
 # the second sometimes gets lost.
 sleep 5
 update_server_zone $SERVER_NAME $SERVER_IP $IXFR_TOP/largezone_n-0.db
-status=`expr $status + $?`
 
 # TODO: Need to alter configuration of BIND 10 server such that it accepts
 # NOTIFYs from and sends IXFR requests to the BIND 9 master.
@@ -76,21 +74,13 @@ status=`expr $status + $?`
 # Do this by allowing notifies and then triggering a re-notification of the
 # server.
 echo "I:notifying IXFR-client $CLIENT_NAME of presence of new version of zone"
-cp ns1/named_notify.conf ns1/named.conf
-
+cp $IXFR_TOP/named_notify.conf ns1/named.conf
 do_rndc $SERVER_NAME $SERVER_IP reconfig
-status=`expr $status + $?`
-
 do_rndc $SERVER_NAME $SERVER_IP notify example
-status=`expr $status + $?`
 
 # Wait for the client to update itself.
 wait_for_update $CLIENT_NAME $CLIENT_IP $old_client_serial
-status=`expr $status + $?`
 
 # Has updated, get the latest serial of the client and server - they
 # should be the same.
 compare_soa $SERVER_NAME $SERVER_IP $CLIENT_NAME $CLIENT_IP
-status=`expr $status + $?`
-
-exit $status

+ 0 - 25
tests/system/ixfr/in-1/clean.sh

@@ -1,25 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2004, 2007, 2011  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.
-
-# Clean up after zone transfer tests.
-
-rm -f ns1/named.conf
-rm -f ns1/zone.db
-rm -f ns1/named.memstats
-
-rm -f nsx2/bind10.run
-rm -f nsx2/zone.sqlite3

+ 1 - 0
tests/system/ixfr/in-1/clean.sh

@@ -0,0 +1 @@
+../clean.sh

+ 1 - 1
tests/system/ixfr/in-1/setup.sh.in

@@ -22,7 +22,7 @@ sh clean.sh
 
 # Set up the initial version of the IXFR server - load the n-4 version of the
 # zone.  The configuration file enables IXFR and disabled notifies.
-cp -f ns1/named_nonotify.conf ns1/named.conf
+cp -f $IXFR_TOP/named_nonotify.conf ns1/named.conf
 cp -f $IXFR_TOP/largezone_n-4.db ns1/zone.db
 
 # Set up the IXFR client - load the same version of the zone.

+ 0 - 25
tests/system/ixfr/in-2/clean.sh

@@ -1,25 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2004, 2007, 2011  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.
-
-# Clean up after zone transfer tests.
-
-rm -f ns1/named.conf
-rm -f ns1/zone.db
-rm -f ns1/named.memstats
-
-rm -f nsx2/bind10.run
-rm -f nsx2/zone.sqlite3

+ 1 - 0
tests/system/ixfr/in-2/clean.sh

@@ -0,0 +1 @@
+../clean.sh

+ 0 - 40
tests/system/ixfr/in-2/ns1/named_nonotify.conf

@@ -1,40 +0,0 @@
-/*
- * Copyright (C) 2004, 2007, 2011  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.
- */
-
-include "../../../common/rndc.key";
-
-controls {
-        inet 10.53.0.1 port 9953 allow { any; } keys { rndc_key; };
-};
-
-options {
-	query-source address 10.53.0.1;
-	notify-source 10.53.0.1;
-	transfer-source 10.53.0.1;
-	port 53210;
-	pid-file "named.pid";
-	listen-on { 10.53.0.1; };
-	listen-on-v6 { none; };
-	recursion no;
-	ixfr-from-differences yes;
-	notify no;
-};
-
-zone "example" {
-	type master;
-	file "zone.db";
-};

+ 0 - 41
tests/system/ixfr/in-2/ns1/named_notify.conf

@@ -1,41 +0,0 @@
-/*
- * Copyright (C) 2004, 2007, 2011  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.
- */
-
-include "../../../common/rndc.key";
-
-controls {
-        inet 10.53.0.1 port 9953 allow { any; } keys { rndc_key; };
-};
-
-options {
-	query-source address 10.53.0.1;
-	notify-source 10.53.0.1;
-	transfer-source 10.53.0.1;
-	port 53210;
-	pid-file "named.pid";
-	listen-on { 10.53.0.1; };
-	listen-on-v6 { none; };
-	recursion no;
-	ixfr-from-differences yes;
-	notify explicit;
-	also-notify { 10.53.0.2; };
-};
-
-zone "example" {
-	type master;
-	file "zone.db";
-};

+ 1 - 1
tests/system/ixfr/in-2/setup.sh.in

@@ -22,7 +22,7 @@ sh clean.sh
 
 # Set up the initial version of the IXFR server - load the n-6 version of the
 # zone.  The configuration file enables IXFR and disabled notifies.
-cp -f ns1/named_nonotify.conf ns1/named.conf
+cp -f $IXFR_TOP/named_nonotify.conf ns1/named.conf
 cp -f $IXFR_TOP/largezone_n-6.db ns1/zone.db
 
 # Set up the IXFR client - load an earlier version of the zone

+ 0 - 24
tests/system/ixfr/in-3/clean.sh

@@ -1,24 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2004, 2007, 2011  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.
-
-# Clean up after zone transfer tests.
-
-rm -f ns1/zone.db
-rm -f ns1/named.memstats
-
-rm -f nsx2/bind10.run
-rm -f nsx2/zone.sqlite3

+ 1 - 0
tests/system/ixfr/in-3/clean.sh

@@ -0,0 +1 @@
+../clean.sh

+ 1 - 0
tests/system/ixfr/in-3/setup.sh.in

@@ -22,6 +22,7 @@ sh clean.sh
 
 # Set up the initial version of the IXFR server - load the latest version of
 # the zone.
+cp -f $IXFR_TOP/named_noixfr.conf ns1/named.conf
 cp -f $IXFR_TOP/largezone_n-0.db ns1/zone.db
 
 # Set up the IXFR client - load a previous version of the zone.

+ 0 - 24
tests/system/ixfr/in-4/clean.sh

@@ -1,24 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2004, 2007, 2011  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.
-
-# Clean up after zone transfer tests.
-
-rm -f ns1/zone.db
-rm -f ns1/named.memstats
-
-rm -f nsx2/bind10.run
-rm -f nsx2/zone.sqlite3

+ 1 - 0
tests/system/ixfr/in-4/clean.sh

@@ -0,0 +1 @@
+../clean.sh

+ 0 - 41
tests/system/ixfr/in-4/ns1/named.conf

@@ -1,41 +0,0 @@
-/*
- * Copyright (C) 2004, 2007, 2011  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.
- */
-
-include "../../../common/rndc.key";
-
-controls {
-        inet 10.53.0.1 port 9953 allow { any; } keys { rndc_key; };
-};
-
-options {
-	query-source address 10.53.0.1;
-	notify-source 10.53.0.1;
-	transfer-source 10.53.0.1;
-	port 53210;
-	pid-file "named.pid";
-	listen-on { 10.53.0.1; };
-	listen-on-v6 { none; };
-	recursion no;
-	ixfr-from-differences no;
-	notify explicit;
-	also-notify { 10.53.0.2; };
-};
-
-zone "example" {
-	type master;
-	file "zone.db";
-};

+ 1 - 0
tests/system/ixfr/in-4/setup.sh.in

@@ -22,6 +22,7 @@ sh clean.sh
 
 # Set up the initial version of the IXFR server - load the latest version of
 # the zone.
+cp $IXFR_TOP/named_noixfr.conf ns1/named.conf
 cp -f $IXFR_TOP/largezone_n-0.db ns1/zone.db
 
 # Set up the IXFR client - load a previous version of the zone with a short

tests/system/ixfr/in-3/ns1/named.conf → tests/system/ixfr/named_noixfr.conf


tests/system/ixfr/in-1/ns1/named_nonotify.conf → tests/system/ixfr/named_nonotify.conf


tests/system/ixfr/in-1/ns1/named_notify.conf → tests/system/ixfr/named_notify.conf