Parcourir la source

[2624] Drop the system tests

Michal 'vorner' Vaner il y a 12 ans
Parent
commit
7a8781d9f7
78 fichiers modifiés avec 1 ajouts et 4589 suppressions
  1. 0 5
      Makefile.am
  2. 0 26
      configure.ac
  3. 1 1
      tests/Makefile.am
  4. 0 2
      tests/system/.gitignore
  5. 0 16
      tests/system/Makefile.am
  6. 0 64
      tests/system/README
  7. 0 20
      tests/system/bindctl/clean.sh
  8. 0 3
      tests/system/bindctl/nsx1/.gitignore
  9. 0 29
      tests/system/bindctl/nsx1/b10-config.db.template.in
  10. 0 3
      tests/system/bindctl/nsx1/example-normalized.db
  11. 0 25
      tests/system/bindctl/nsx1/root.db
  12. 0 26
      tests/system/bindctl/setup.sh
  13. 0 238
      tests/system/bindctl/tests.sh
  14. 0 36
      tests/system/cleanall.sh
  15. 0 1
      tests/system/common/default_user.csv
  16. 0 25
      tests/system/common/rndc.conf
  17. 0 22
      tests/system/common/rndc.key
  18. 0 73
      tests/system/conf.sh.in
  19. 0 1
      tests/system/glue/.gitignore
  20. 0 15
      tests/system/glue/auth.good
  21. 0 23
      tests/system/glue/clean.sh
  22. 0 22
      tests/system/glue/example.good
  23. 0 14
      tests/system/glue/noglue.good
  24. 0 3
      tests/system/glue/nsx1/.gitignore
  25. 0 36
      tests/system/glue/nsx1/b10-config.db.in
  26. 0 31
      tests/system/glue/nsx1/com.db
  27. 0 32
      tests/system/glue/nsx1/net.db
  28. 0 26
      tests/system/glue/nsx1/root-servers.nil.db
  29. 0 53
      tests/system/glue/nsx1/root.db
  30. 0 25
      tests/system/glue/setup.sh.in
  31. 0 19
      tests/system/glue/test.good
  32. 0 68
      tests/system/glue/tests.sh
  33. 0 226
      tests/system/ifconfig.sh
  34. 0 8
      tests/system/ixfr/.gitignore
  35. 0 86
      tests/system/ixfr/README
  36. 0 51
      tests/system/ixfr/b10-config.db.in
  37. 0 28
      tests/system/ixfr/clean_ns.sh
  38. 0 78
      tests/system/ixfr/common_tests.sh.in
  39. 0 1556
      tests/system/ixfr/db.example.common
  40. 0 29
      tests/system/ixfr/db.example.n0.in
  41. 0 28
      tests/system/ixfr/db.example.n2.in
  42. 0 28
      tests/system/ixfr/db.example.n2.refresh.in
  43. 0 31
      tests/system/ixfr/db.example.n4.in
  44. 0 29
      tests/system/ixfr/db.example.n6.in
  45. 0 1
      tests/system/ixfr/in-1/.gitignore
  46. 0 1
      tests/system/ixfr/in-1/clean.sh
  47. 0 3
      tests/system/ixfr/in-1/ns1/README
  48. 0 3
      tests/system/ixfr/in-1/nsx2/README
  49. 0 30
      tests/system/ixfr/in-1/setup.sh.in
  50. 0 37
      tests/system/ixfr/in-1/tests.sh
  51. 0 1
      tests/system/ixfr/in-2/.gitignore
  52. 0 1
      tests/system/ixfr/in-2/clean.sh
  53. 0 1
      tests/system/ixfr/in-2/ns1/.gitignore
  54. 0 3
      tests/system/ixfr/in-2/ns1/README
  55. 0 1
      tests/system/ixfr/in-2/nsx2/.gitignore
  56. 0 3
      tests/system/ixfr/in-2/nsx2/README
  57. 0 29
      tests/system/ixfr/in-2/setup.sh.in
  58. 0 81
      tests/system/ixfr/in-2/tests.sh
  59. 0 1
      tests/system/ixfr/in-3/.gitignore
  60. 0 1
      tests/system/ixfr/in-3/clean.sh
  61. 0 3
      tests/system/ixfr/in-3/ns1/README
  62. 0 3
      tests/system/ixfr/in-3/nsx2/README
  63. 0 29
      tests/system/ixfr/in-3/setup.sh.in
  64. 0 66
      tests/system/ixfr/in-3/tests.sh
  65. 0 1
      tests/system/ixfr/in-4/.gitignore
  66. 0 1
      tests/system/ixfr/in-4/clean.sh
  67. 0 3
      tests/system/ixfr/in-4/ns1/README
  68. 0 3
      tests/system/ixfr/in-4/nsx2/README
  69. 0 30
      tests/system/ixfr/in-4/setup.sh.in
  70. 0 53
      tests/system/ixfr/in-4/tests.sh
  71. 0 330
      tests/system/ixfr/ixfr_init.sh.in
  72. 0 42
      tests/system/ixfr/named_noixfr.conf
  73. 0 40
      tests/system/ixfr/named_nonotify.conf
  74. 0 41
      tests/system/ixfr/named_notify.conf
  75. 0 125
      tests/system/run.sh.in
  76. 0 44
      tests/system/runall.sh
  77. 0 229
      tests/system/start.pl
  78. 0 188
      tests/system/stop.pl

+ 0 - 5
Makefile.am

@@ -115,11 +115,6 @@ cppcheck:
 		--template '{file}:{line}: check_fail: {message} ({severity},{id})' \
 		--template '{file}:{line}: check_fail: {message} ({severity},{id})' \
 		src
 		src
 
 
-# system tests
-systest:
-	cd tests/system; \
-	sh $(abs_srcdir)/tests/system/runall.sh
-
 ### include tool to generate documentation from log message specifications
 ### include tool to generate documentation from log message specifications
 ### in the distributed tarball:
 ### in the distributed tarball:
 EXTRA_DIST = tools/system_messages.py
 EXTRA_DIST = tools/system_messages.py

+ 0 - 26
configure.ac

@@ -1305,7 +1305,6 @@ AC_CONFIG_FILES([Makefile
                  src/lib/statistics/Makefile
                  src/lib/statistics/Makefile
                  src/lib/statistics/tests/Makefile
                  src/lib/statistics/tests/Makefile
                  tests/Makefile
                  tests/Makefile
-                 tests/system/Makefile
                  tests/tools/Makefile
                  tests/tools/Makefile
                  tests/tools/badpacket/Makefile
                  tests/tools/badpacket/Makefile
                  tests/tools/badpacket/tests/Makefile
                  tests/tools/badpacket/tests/Makefile
@@ -1389,23 +1388,6 @@ AC_OUTPUT([doc/version.ent
            src/lib/util/python/gen_wiredata.py
            src/lib/util/python/gen_wiredata.py
            src/lib/server_common/tests/data_path.h
            src/lib/server_common/tests/data_path.h
            tests/lettuce/setup_intree_bind10.sh
            tests/lettuce/setup_intree_bind10.sh
-           tests/system/conf.sh
-           tests/system/run.sh
-           tests/system/glue/setup.sh
-           tests/system/glue/nsx1/b10-config.db
-           tests/system/bindctl/nsx1/b10-config.db.template
-           tests/system/ixfr/db.example.n0
-           tests/system/ixfr/db.example.n2
-           tests/system/ixfr/db.example.n2.refresh
-           tests/system/ixfr/db.example.n4
-           tests/system/ixfr/db.example.n6
-           tests/system/ixfr/ixfr_init.sh
-           tests/system/ixfr/b10-config.db
-           tests/system/ixfr/common_tests.sh
-           tests/system/ixfr/in-1/setup.sh
-           tests/system/ixfr/in-2/setup.sh
-           tests/system/ixfr/in-3/setup.sh
-           tests/system/ixfr/in-4/setup.sh
           ], [
           ], [
            chmod +x src/bin/cmdctl/run_b10-cmdctl.sh
            chmod +x src/bin/cmdctl/run_b10-cmdctl.sh
            chmod +x src/bin/xfrin/run_b10-xfrin.sh
            chmod +x src/bin/xfrin/run_b10-xfrin.sh
@@ -1436,14 +1418,6 @@ AC_OUTPUT([doc/version.ent
            chmod +x src/lib/util/python/mkpywrapper.py
            chmod +x src/lib/util/python/mkpywrapper.py
            chmod +x src/lib/util/python/gen_wiredata.py
            chmod +x src/lib/util/python/gen_wiredata.py
            chmod +x src/lib/python/isc/log/tests/log_console.py
            chmod +x src/lib/python/isc/log/tests/log_console.py
-           chmod +x tests/system/conf.sh
-           chmod +x tests/system/run.sh
-           chmod +x tests/system/ixfr/ixfr_init.sh
-           chmod +x tests/system/ixfr/common_tests.sh
-           chmod +x tests/system/ixfr/in-1/setup.sh
-           chmod +x tests/system/ixfr/in-2/setup.sh
-           chmod +x tests/system/ixfr/in-3/setup.sh
-           chmod +x tests/system/ixfr/in-4/setup.sh
           ])
           ])
 AC_OUTPUT
 AC_OUTPUT
 
 

+ 1 - 1
tests/Makefile.am

@@ -1 +1 @@
-SUBDIRS = system tools
+SUBDIRS = tools

+ 0 - 2
tests/system/.gitignore

@@ -1,2 +0,0 @@
-/conf.sh
-/run.sh

+ 0 - 16
tests/system/Makefile.am

@@ -1,16 +0,0 @@
-systest:
-	sh $(srcdir)/runall.sh
-
-distclean-local:
-	sh $(srcdir)/cleanall.sh
-
-# Most of the files under this directory (including test subdirectories)
-# must be listed in EXTRA_DIST.
-EXTRA_DIST = README cleanall.sh ifconfig.sh start.pl stop.pl runall.sh
-EXTRA_DIST += common/default_user.csv
-EXTRA_DIST += glue/auth.good glue/example.good glue/noglue.good glue/test.good
-EXTRA_DIST += glue/tests.sh glue/clean.sh
-EXTRA_DIST += glue/nsx1/com.db glue/nsx1/net.db glue/nsx1/root-servers.nil.db
-EXTRA_DIST += glue/nsx1/root.db
-EXTRA_DIST += bindctl/tests.sh bindctl/clean.sh bindctl/setup.sh
-EXTRA_DIST += bindctl/nsx1/root.db bindctl/nsx1/example-normalized.db

+ 0 - 64
tests/system/README

@@ -1,64 +0,0 @@
-Copyright (C) 2004, 2010, 2011  Internet Systems Consortium, Inc. ("ISC")
-Copyright (C) 2000, 2001  Internet Software Consortium.
-See COPYRIGHT in the source root or http://isc.org/copyright.html for terms.
-
-This is a simple test environment for running BIND 10 system tests
-involving multiple name servers.  It was originally developed for BIND
-9, and has been ported to test BIND 10 implementations.  Ideally we
-should share the same framework for both versions, so some part of the
-original setup are kept, even though they are BIND 9 specific and not
-currently used.
-
-Also, these tests generally rely on BIND 9 programs, most commonly
-its dig, and will sometimes be its name server (named).  So, the test
-environment assumes that there's a source tree of BIND 9 where its
-programs are built, and that an environment variable "BIND9_TOP" is set
-to point to the top directory of the source tree.
-
-There are multiple test suites, each in a separate subdirectory and
-involving a different DNS setup.  They are:
-
-  bindctl/      Some basic management operations using the bindctl tool
-  glue/		    Glue handling tests
-  ixfr/         Incremental transfer tests
-
-(the following tests are planned to be added soon)
-  dnssec/	    DNSSEC tests
-  masterfile/	Master file parser
-  axfr/         Full-transfer tests
-
-Typically each test suite sets up 2-5 instances of BIND 10 (or BIND 9
-named) and then performs one or more tests against them.  Within the test
-suite subdirectory, each instance has a separate subdirectory containing
-its configuration data.  By convention, these subdirectories are named
-"nsx1", "nsx2", etc for BIND 10 ("x" means BIND 10), and "ns1", "ns2",
-etc. for BIND 9.
-
-The tests are completely self-contained and do not require access to
-the real DNS.  Generally, one of the test servers (ns[x]1) is set up as
-a root name server and is listed in the hints file of the others.
-
-To enable all servers to run on the same machine, they bind to separate
-virtual IP address on the loopback interface.  ns[x]1 runs on 10.53.0.1,
-ns[x]2 on 10.53.0.2, etc.  Before running any tests, you must set up
-these addresses by running "ifconfig.sh up" as root.
-
-Mac OS X:
-If you wish to make the interfaces survive across reboots copy
-org.isc.bind.system and org.isc.bind.system to /Library/LaunchDaemons
-then run "launchctl load /Library/LaunchDaemons/org.isc.bind.system.plist"
-as root.
-
-The servers use port 53210 instead of the usual port 53, so they can be
-run without root privileges once the interfaces have been set up.
-
-The tests can be run individually like this:
-
-  sh run.sh xfer
-  sh run.sh glue
-  etc.
-
-To run all the tests, just type "make systest" either on this directory
-or on the top source directory.  Note: currently these tests cannot be
-run when built under a separate build directory.  Everything must be
-run within the original source tree.

+ 0 - 20
tests/system/bindctl/clean.sh

@@ -1,20 +0,0 @@
-#!/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.
-
-rm -f */b10-config.db
-rm -f dig.out.* bindctl.out.*
-rm -f */msgq_socket */zone.sqlite3

+ 0 - 3
tests/system/bindctl/nsx1/.gitignore

@@ -1,3 +0,0 @@
-/b10-config.db.template
-/bind10.run
-/bindctl.out

+ 0 - 29
tests/system/bindctl/nsx1/b10-config.db.template.in

@@ -1,29 +0,0 @@
-{"version": 2,
- "Auth": {
-   "listen_on": [{"address": "10.53.0.1", "port": 53210}],
-   "database_file": "@abs_builddir@/zone.sqlite3"
- },
- "data_sources": {
-    "classes": {
-        "IN": [{
-            "type": "sqlite3",
-            "params": {
-                "database_file": "@abs_builddir@/zone.sqlite3"
-            }
-        }]
-    }
- },
- "Logging": {
-     "loggers": [
-        {
-            "name": "*",
-            "severity": "DEBUG",
-            "output_options": [],
-            "debuglevel": 99
-        }
-     ]
- },
- "Stats": {
-   "poll-interval": 1
- }
-}

+ 0 - 3
tests/system/bindctl/nsx1/example-normalized.db

@@ -1,3 +0,0 @@
-com.					      300 IN SOA	postmaster.example. ns.example.com. 2000042100 600 600 1200 600
-com.					      300 IN NS		ns.example.com.
-ns.example.com.				      300 IN A		192.0.2.2

+ 0 - 25
tests/system/bindctl/nsx1/root.db

@@ -1,25 +0,0 @@
-; 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.
-
-$TTL 300
-. 			IN SOA	postmaster.example. a.root.servers.nil. (
-				2000042100   	; serial
-				600         	; refresh
-				600         	; retry
-				1200    	; expire
-				600       	; minimum
-				)
-.			NS	ns.example.com.
-ns.example.com.		A	192.0.2.1

+ 0 - 26
tests/system/bindctl/setup.sh

@@ -1,26 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2011  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.
-
-SYSTEMTESTTOP=..
-. $SYSTEMTESTTOP/conf.sh
-
-SUBTEST_TOP=${TEST_TOP}/bindctl
-
-cp ${SUBTEST_TOP}/nsx1/b10-config.db.template ${SUBTEST_TOP}/nsx1/b10-config.db
-
-rm -f ${SUBTEST_TOP}/*/zone.sqlite3
-${B10_LOADZONE} -i 1 -c "{\"database_file\": \"${SUBTEST_TOP}/nsx1/zone.sqlite3\"}" \
-	. ${SUBTEST_TOP}//nsx1/root.db

+ 0 - 238
tests/system/bindctl/tests.sh

@@ -1,238 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2011  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.
-
-SYSTEMTESTTOP=..
-. $SYSTEMTESTTOP/conf.sh
-
-#
-# Do bindctl tests.
-#
-
-status=0
-n=0
-
-# TODO: consider consistency with statistics definition in auth.spec
-
-# flatten JSON
-awk_flatten_json='
-function join(ary, len) {
-    ret = "";
-    for (i = 1; i <= len; ++i) {
-        ret = ret""ary[i];
-    }
-    return ret;
-}
-BEGIN {
-    depth = 0;
-}
-/.+{$/ {
-    label[++depth] = $1;
-    next;
-}
-/},?/ {
-    --depth;
-    next;
-}
-/:/ {
-    print join(label,depth)""$1" "$2;
-}
-'
-# Check the counters have expected values given with 1st argument.
-# This function tests only these counters will be incremented in every checks
-# since the content of datasource and requests are not changed in this test. 
-test_counters () {
-    status=0
-    $AWK "$awk_flatten_json" bindctl.out.$n | \
-        grep '"Auth":"zones":"_SERVER_":"request":"v4": '$1 > \
-        /dev/null || status=1
-    $AWK "$awk_flatten_json" bindctl.out.$n | \
-        grep '"Auth":"zones":"_SERVER_":"request":"v6": '0 > \
-        /dev/null || status=1
-    $AWK "$awk_flatten_json" bindctl.out.$n | \
-        grep '"Auth":"zones":"_SERVER_":"request":"udp": '$1 > \
-        /dev/null || status=1
-    $AWK "$awk_flatten_json" bindctl.out.$n | \
-        grep '"Auth":"zones":"_SERVER_":"request":"tcp": '0 > \
-        /dev/null || status=1
-    $AWK "$awk_flatten_json" bindctl.out.$n | \
-        grep '"Auth":"zones":"_SERVER_":"opcode":"query": '$1 > \
-        /dev/null || status=1
-    $AWK "$awk_flatten_json" bindctl.out.$n | \
-        grep '"Auth":"zones":"_SERVER_":"responses": '$1 > \
-        /dev/null || status=1
-    $AWK "$awk_flatten_json" bindctl.out.$n | \
-        grep '"Auth":"zones":"_SERVER_":"rcode":"noerror": '$1 > \
-        /dev/null || status=1
-    $AWK "$awk_flatten_json" bindctl.out.$n | \
-        grep '"Auth":"zones":"_SERVER_":"qrysuccess": '$1 > \
-        /dev/null || status=1
-    $AWK "$awk_flatten_json" bindctl.out.$n | \
-        grep '"Auth":"zones":"_SERVER_":"qryauthans": '$1 > \
-        /dev/null || status=1
-    return $status
-}
-expected_count=0
-
-echo "I:Checking b10-auth is disabled by default ($n)"
-$DIG +norec @10.53.0.1 -p 53210 ns.example.com. A > /dev/null && status=1
-if [ $status != 0 ]; then echo "I:failed"; fi
-n=`expr $n + 1`
-
-echo "I:Starting b10-auth and checking that it works ($n)"
-echo 'config add Init/components b10-auth
-config set Init/components/b10-auth { "special": "auth", "kind": "needed" }
-config commit
-quit
-' | $RUN_BINDCTL \
-	--csv-file-dir=$BINDCTL_CSV_DIR 2>&1 > /dev/null || status=1
-$DIG +norec @10.53.0.1 -p 53210 ns.example.com. A >dig.out.$n || status=1
-# perform a simple check on the output (digcomp would be too much for this)
-grep 192.0.2.1 dig.out.$n > /dev/null || status=1
-if [ $status != 0 ]; then echo "I:failed"; fi
-n=`expr $n + 1`
-
-echo "I:Checking BIND 10 statistics after a pause ($n)"
-# wait for 2sec to make sure b10-stats gets the latest statistics.
-sleep 2
-echo 'Stats show
-' | $RUN_BINDCTL \
-	--csv-file-dir=$BINDCTL_CSV_DIR > bindctl.out.$n || status=1
-# the server should have received 1 request
-expected_count=`expr $expected_count + 1`
-test_counters $expected_count
-if [ $? != 0 ]; then echo "I:failed"; fi
-n=`expr $n + 1`
-
-echo "I:Stopping b10-auth and checking that ($n)"
-echo 'config remove Init/components b10-auth
-config commit
-quit
-' | $RUN_BINDCTL \
-	--csv-file-dir=$BINDCTL_CSV_DIR 2>&1 > /dev/null || status=1
-# dig should exit with a failure code.
-$DIG +tcp +norec @10.53.0.1 -p 53210 ns.example.com. A > /dev/null && status=1
-if [ $status != 0 ]; then echo "I:failed"; fi
-n=`expr $n + 1`
-
-echo "I:Restarting b10-auth and checking that ($n)"
-echo 'config add Init/components b10-auth
-config set Init/components/b10-auth { "special": "auth", "kind": "needed" }
-config commit
-quit
-' | $RUN_BINDCTL \
-	--csv-file-dir=$BINDCTL_CSV_DIR 2>&1 > /dev/null || status=1
-sleep 2
-$DIG +norec @10.53.0.1 -p 53210 ns.example.com. A >dig.out.$n || status=1
-# perform a simple check on the output (digcomp would be too much for this)
-grep 192.0.2.1 dig.out.$n > /dev/null || status=1
-if [ $status != 0 ]; then echo "I:failed"; fi
-n=`expr $n + 1`
-
-echo "I:Rechecking BIND 10 statistics after a pause ($n)"
-sleep 2
-echo 'Stats show
-' | $RUN_BINDCTL \
-	--csv-file-dir=$BINDCTL_CSV_DIR > bindctl.out.$n || status=1
-# The statistics counters can not be reset even after auth
-# restarts. Because stats preserves the query counts which the dying
-# auth sent. Then it cumulates them and new counts which the living
-# auth sends. This note assumes that the issue would have been
-# resolved : "#1941 stats lossage (multiple auth servers)".
-expected_count=`expr $expected_count + 1`
-test_counters $expected_count
-if [ $? != 0 ]; then echo "I:failed"; fi
-n=`expr $n + 1`
-
-echo "I:Changing the data source from sqlite3 to in-memory ($n)"
-DATASRC_SPEC='{"type": "MasterFiles", "cache-enable": true, "params": {"com":'
-DATASRC_SPEC="${DATASRC_SPEC} \"${TEST_TOP}/bindctl/nsx1/example-normalized.db\"}}"
-echo "config set data_sources/classes/IN[0] ${DATASRC_SPEC}
-config commit
-quit
-" | $RUN_BINDCTL \
-	--csv-file-dir=$BINDCTL_CSV_DIR > bindctl.out.$n || status=1
-sleep 2
-$DIG +norec @10.53.0.1 -p 53210 ns.example.com. A >dig.out.$n || status=1
-grep 192.0.2.2 dig.out.$n > /dev/null || status=1
-if [ $status != 0 ]; then echo "I:failed"; fi
-n=`expr $n + 1`
-
-echo "I:Rechecking BIND 10 statistics after changing the datasource ($n)"
-sleep 2
-echo 'Stats show
-' | $RUN_BINDCTL \
-	--csv-file-dir=$BINDCTL_CSV_DIR > bindctl.out.$n || status=1
-# The statistics counters shouldn't be reset due to hot-swapping datasource.
-expected_count=`expr $expected_count + 1`
-test_counters $expected_count
-if [ $? != 0 ]; then echo "I:failed"; fi
-n=`expr $n + 1`
-
-echo "I:Starting more b10-auths and checking that ($n)"
-for i in 2 3
-do
-    echo 'config add Init/components b10-auth-'$i'
-config set Init/components/b10-auth-'$i' { "special": "auth", "kind": "needed" }
-config commit
-quit
-' | $RUN_BINDCTL \
-	--csv-file-dir=$BINDCTL_CSV_DIR 2>&1 > /dev/null || status=1
-done
-sleep 2
-$DIG +norec @10.53.0.1 -p 53210 ns.example.com. A >dig.out.$n || status=1
-grep 192.0.2.2 dig.out.$n > /dev/null || status=1
-if [ $status != 0 ]; then echo "I:failed"; fi
-n=`expr $n + 1`
-
-echo "I:Rechecking BIND 10 statistics consistency after a pause ($n)"
-sleep 2
-expected_count=`expr $expected_count + 1`
-# Rechecking some times
-for i in 1 2 3 4
-do
-    echo 'Stats show
-' | $RUN_BINDCTL \
-	--csv-file-dir=$BINDCTL_CSV_DIR > bindctl.out.$n || status=1
-    # The statistics counters should keep being consistent even while
-    # multiple b10-auths are running.
-
-    test_counters $expected_count
-    if [ $? != 0 ]; then echo "I:failed "; break ; fi
-done
-n=`expr $n + 1`
-
-echo "I:Stopping extra b10-auths and checking that ($n)"
-for i in 3 2
-do
-    echo 'config remove Init/components b10-auth-'$i'
-config commit
-quit
-' | $RUN_BINDCTL \
-	--csv-file-dir=$BINDCTL_CSV_DIR 2>&1 > /dev/null || status=1
-done
-sleep 2
-$DIG +norec @10.53.0.1 -p 53210 ns.example.com. A >dig.out.$n || status=1
-grep 192.0.2.2 dig.out.$n > /dev/null || status=1
-if [ $status != 0 ]; then echo "I:failed"; fi
-n=`expr $n + 1`
-
-# The statistics counters can not be rechecked here because the auth
-# instance seems to hang up after one of the multiple auth instances
-# was removed via bindctl. This reason seems to be the same reason as
-# #1703.
-
-echo "I:exit status: $status"
-exit $status

+ 0 - 36
tests/system/cleanall.sh

@@ -1,36 +0,0 @@
-#!/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.
-
-#
-# Clean up after system tests.
-#
-
-find . -type f \( \
-    -name 'K*' -o -name '*~' -o -name '*.core' -o -name '*.log' \
-    -o -name '*.pid' -o -name '*.keyset' -o -name named.run \
-    -o -name bind10.run -o -name lwresd.run -o -name ans.run \) -print | \
-    xargs rm -f
-
-status=0
-
-for d in ./.* ./* ./*/*
-do
-   case $d in ./.|./..) continue ;; esac
-   test -d $d || continue
-
-   test ! -f $d/clean.sh || ( cd $d && sh clean.sh )
-done

+ 0 - 1
tests/system/common/default_user.csv

@@ -1 +0,0 @@
-root,bind10

+ 0 - 25
tests/system/common/rndc.conf

@@ -1,25 +0,0 @@
-/*
- * 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.
- */
-
-options {
-        default-key     "rndc_key";
-};
-
-key rndc_key {
-        algorithm       hmac-md5;
-        secret          "1234abcd8765";
-};

+ 0 - 22
tests/system/common/rndc.key

@@ -1,22 +0,0 @@
-/*
- * Copyright (C) 2011  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: rndc.key,v 1.3 2011-03-12 04:59:47 tbox Exp $ */
-
-key rndc_key {
-        secret "1234abcd8765";
-        algorithm hmac-md5;
-};

+ 0 - 73
tests/system/conf.sh.in

@@ -1,73 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2004-2011  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.
-
-#
-# Common configuration data for system tests, to be sourced into
-# other shell scripts.
-#
-
-# Prerequisite check
-if [ @srcdir@ != @builddir@ ]; then
-	echo "Currently systest doesn't work for a separate build tree."
-	echo "Rebuild BIND 10 on the source tree and run the tests."
-	exit 1
-fi
-
-if [ -z $BIND9_TOP ]; then
-	echo "systest assumes there's a compiled tree of BIND 9 which can be"
-	echo "accessed via the BIND9_TOP environment variable."
-	echo "Please make sure this assumption is met."
-	exit 1
-fi
-
-# Find the top of the source and test trees.
-export TOP=@abs_top_srcdir@
-export TEST_TOP=@abs_builddir@
-
-# Programs
-export RUN_BIND10=$TOP/src/bin/bind10/run_bind10.sh
-export RUN_BINDCTL=$TOP/src/bin/bindctl/run_bindctl.sh
-export BINDCTL_CSV_DIR=@abs_srcdir@/common/
-export B10_LOADZONE=$TOP/src/bin/loadzone/run_loadzone.sh
-export BIND9_NAMED=$BIND9_TOP/bin/named/named
-export DIG=$BIND9_TOP/bin/dig/dig
-export RNDC=$BIND9_TOP/bin/rndc/rndc
-
-# Test tools borrowed from BIND 9's system test (without change).
-export TESTSOCK=$BIND9_TOP/bin/tests/system/testsock.pl
-export DIGCOMP=$BIND9_TOP/bin/tests/system/digcomp.pl
-
-# bindctl test doesn't work right now and is disabled (see #2568)
-#export SUBDIRS="bindctl glue ixfr/in-2"
-export SUBDIRS="glue ixfr/in-2"
-
-# Add appropriate subdirectories to the above statement as the tests become
-# available.
-#SUBDIRS="dnssec masterfile ixfr/in-1 ixfr/in-2 ixfr/in-4"
-
-# PERL will be an empty string if no perl interpreter was found.  A similar
-# comment applies to AWK.
-export PERL=@PERL@
-export AWK=@AWK@
-
-# Other constants
-export RNDC_PORT=9953
-export DNS_PORT=53210
-
-export TESTS_TOP=$TOP/tests
-export SYSTEM_TOP=$TESTS_TOP/system
-export IXFR_TOP=$SYSTEM_TOP/ixfr

+ 0 - 1
tests/system/glue/.gitignore

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

+ 0 - 15
tests/system/glue/auth.good

@@ -1,15 +0,0 @@
-
-; <<>> DiG 9.0 <<>> +norec @10.53.0.1 -p 5300 foo.bar.example.org. a
-;; global options:  printcmd
-;; Got answer:
-;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 41239
-;; flags: qr ad; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1
-
-;; QUESTION SECTION:
-;foo.bar.example.org.			IN	A
-
-;; AUTHORITY SECTION:
-example.org.		172800	IN	NS	b.root-servers.nil.
-
-;; ADDITIONAL SECTION:
-b.root-servers.nil.	300	IN	A	10.53.0.2

+ 0 - 23
tests/system/glue/clean.sh

@@ -1,23 +0,0 @@
-#!/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.
-
-#
-# Clean up after glue tests.
-#
-
-rm -f dig.out.*
-rm -f */msgq_socket */zone.sqlite3

+ 0 - 22
tests/system/glue/example.good

@@ -1,22 +0,0 @@
-
-; <<>> DiG 9.0 <<>> +norec @10.53.0.1 -p 5300 foo.bar.example. A
-;; global options:  printcmd
-;; Got answer:
-;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 58772
-;; flags: qr ad; QUERY: 1, ANSWER: 0, AUTHORITY: 6, ADDITIONAL: 7
-
-;; QUESTION SECTION:
-;foo.bar.example.			IN	A
-
-;; AUTHORITY SECTION:
-example.			172800	IN	NS	NS1.example.COM.
-example.			172800	IN	NS	NS.example.
-
-;; ADDITIONAL SECTION:
-NS.example.		172800	IN	A	192.0.2.1
-NS.example.		172800	IN	A	192.0.2.2
-NS1.example.COM.	172800	IN	A	192.0.2.3
-;; These are not used now - they are in a different master file
-;; than the answer.
-; NS1.example.COM.	172800	IN	A	192.0.2.101
-; NS1.example.COM.		172800	IN	AAAA	2001:db8::1

+ 0 - 14
tests/system/glue/noglue.good

@@ -1,14 +0,0 @@
-
-; <<>> DiG 9.0 <<>> @10.53.0.1 -p 5300 example.net a
-;; global options:  printcmd
-;; Got answer:
-;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 29409
-;; flags: qr rd ad; QUERY: 1, ANSWER: 0, AUTHORITY: 2, ADDITIONAL: 0
-
-;; QUESTION SECTION:
-;example.net.			IN	A
-
-;; AUTHORITY SECTION:
-example.net.		300	IN	NS	ns2.example.info.
-example.net.		300	IN	NS	ns1.example.info.
-

+ 0 - 3
tests/system/glue/nsx1/.gitignore

@@ -1,3 +0,0 @@
-/b10-config.db
-/bind10.run
-/bindctl.out

+ 0 - 36
tests/system/glue/nsx1/b10-config.db.in

@@ -1,36 +0,0 @@
-{"version": 2,
- "Auth": {
-   "listen_on": [{"address": "10.53.0.1", "port": 53210}],
-   "database_file": "@abs_builddir@/zone.sqlite3"
- },
- "data_sources": {
-    "classes": {
-        "IN": [{
-            "type": "sqlite3",
-            "params": {
-                "database_file": "@abs_builddir@/zone.sqlite3"
-            }
-        }]
-    }
- },
- "Logging": {
-     "loggers": [
-        {
-            "name": "*",
-            "severity": "DEBUG",
-            "output_options": [],
-            "debuglevel": 99
-        }
-     ]
- },
- "Init": {
-   "components": {
-     "b10-auth": {"kind": "needed", "special": "auth" },
-     "b10-xfrin": { "address": "Xfrin", "kind": "dispensable" },
-     "b10-xfrout": { "address": "Xfrout", "kind": "dispensable" },
-     "b10-zonemgr": { "address": "Zonemgr", "kind": "dispensable" },
-     "b10-stats": { "address": "Stats", "kind": "dispensable" },
-     "b10-cmdctl": { "special": "cmdctl", "kind": "needed" }
-   }
- }
-}

+ 0 - 31
tests/system/glue/nsx1/com.db

@@ -1,31 +0,0 @@
-; 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.
-
-$ORIGIN com.
-$TTL 300
-@ 			IN SOA	root.example.com. a.root.servers.nil. (
-				2000042100   	; serial
-				600         	; refresh
-				600         	; retry
-				1200    	; expire
-				600       	; minimum
-				)
-@			NS	a.root-servers.nil.
-
-example.com.			NS	ns1.example.com.
-example.com.			NS	ns2.example.com.
-ns1.example.com.		172800	IN	A	192.0.2.101
-ns1.example.com.		172800	IN	AAAA	2001:db8::1
-ns2.example.com.		172800	IN	A	192.0.2.102

+ 0 - 32
tests/system/glue/nsx1/net.db

@@ -1,32 +0,0 @@
-; 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.
-
-$ORIGIN net.
-$TTL 300
-@ 			IN SOA	root.example.net. a.root.servers.nil. (
-				2000042100   	; serial
-				600         	; refresh
-				600         	; retry
-				1200    	; expire
-				600       	; minimum
-				)
-@			NS	a.root-servers.nil.
-
-; Referral outside of server authority, but with glue records present.
-; Don't hand out the glue.
-example.net.			NS	ns1.example.info.
-example.net.			NS	ns2.example.info.
-ns1.example.info.	172800	IN	A	192.0.2.101
-ns2.example.info.	172800	IN	A	192.0.2.102

+ 0 - 26
tests/system/glue/nsx1/root-servers.nil.db

@@ -1,26 +0,0 @@
-; 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.
-
-$TTL 300
-@			IN SOA	ns hostmaster (
-				1
-				3600
-				1800
-				1814400
-				3600
-				)
-			NS	a
-a			A	10.53.0.1
-b			A	10.53.0.2

+ 0 - 53
tests/system/glue/nsx1/root.db

@@ -1,53 +0,0 @@
-; 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.
-
-$TTL 300
-. 			IN SOA	postmaster.example. a.root.servers.nil. (
-				2000042100   	; serial
-				600         	; refresh
-				600         	; retry
-				1200    	; expire
-				600       	; minimum
-				)
-.			NS	a.root-servers.nil.
-
-root-servers.nil.	NS	a.root-servers.nil.
-a.root-servers.nil.	A	10.53.0.1
-
-; Delegate some domains that contain name servers for the sample
-; ccTLDs below.
-com.			172800	IN	NS	a.root-servers.nil.
-
-;
-; A sample TLD
-;
-example.			172800	IN	NS	NS.example.
-example.			172800	IN	NS	NS1.example.COM.
-NS.example.			172800	IN	A	192.0.2.1
-NS.example.			172800	IN	A	192.0.2.2
-NS1.example.COM.		172800	IN	A	192.0.2.3
-
-;
-;
-;
-test.				172800	IN	NS	ns.test.
-test.				172800	IN	NS	ns1.example.net.
-ns.test.			172800	IN	A	192.0.2.200
-ns1.example.net.		172800	IN	A	192.0.2.201
-
-;
-; A hypothetical ccTLD where we are authoritative for the NS glue.
-;
-example.org		172800  IN      NS      b.root-servers.nil.

+ 0 - 25
tests/system/glue/setup.sh.in

@@ -1,25 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2011  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.
-
-SYSTEMTESTTOP=..
-. $SYSTEMTESTTOP/conf.sh
-
-rm -f */zone.sqlite3
-${B10_LOADZONE} -i 1 -c '{"database_file": "@builddir@/nsx1/zone.sqlite3"}' . @builddir@/nsx1/root.db
-${B10_LOADZONE} -i 1 -c '{"database_file": "@builddir@/nsx1/zone.sqlite3"}' root-servers.nil \
-	@builddir@/nsx1/root-servers.nil.db
-${B10_LOADZONE} -i 1 -c '{"database_file": "@builddir@/nsx1/zone.sqlite3"}' com @builddir@/nsx1/com.db
-${B10_LOADZONE} -i 1 -c '{"database_file": "@builddir@/nsx1/zone.sqlite3"}' net @builddir@/nsx1/net.db

+ 0 - 19
tests/system/glue/test.good

@@ -1,19 +0,0 @@
-
-; <<>> DiG 9.8.0 <<>> @127.0.0.1 -p 5300 foo.bar.test
-; (1 server found)
-;; global options: +cmd
-;; Got answer:
-;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 55069
-;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 2, ADDITIONAL: 2
-;; WARNING: recursion requested but not available
-
-;; QUESTION SECTION:
-;foo.bar.test.			IN	A
-
-;; AUTHORITY SECTION:
-test.			172800	IN	NS	ns.test.
-test.			172800	IN	NS	ns1.example.net.
-
-;; ADDITIONAL SECTION:
-ns.test.		172800	IN	A	192.0.2.200
-ns1.example.net.	172800	IN	A	192.0.2.201

+ 0 - 68
tests/system/glue/tests.sh

@@ -1,68 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2004, 2007  Internet Systems Consortium, Inc. ("ISC")
-# Copyright (C) 2000, 2001, 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.
-
-SYSTEMTESTTOP=..
-. $SYSTEMTESTTOP/conf.sh
-
-#
-# Do glue tests.
-#
-
-status=0
-n=0
-
-# This query should result in a delegation with two NS; one in the delegated
-# zone and one in a so called out-of-bailiwick zone for which the auth server
-# has authority, too.  For the former, the server should return glue in the
-# parent zone.  For the latter, BIND 9 and BIND 10 behave differently; BIND 9
-# uses "glue" in the parent zone (since this is the root zone everything can
-# be considered a valid glue).  BIND 10 (using sqlite3 data source) searches
-# the other zone and uses the authoritative data in that zone (which is
-# intentionally different from the glue in the root zone).
-echo "I:testing that a TLD referral gets a full glue set from the root zone ($n)"
-$DIG +norec @10.53.0.1 -p 53210 foo.bar.example. A >dig.out.$n || status=1
-$PERL $DIGCOMP example.good dig.out.$n || status=1
-n=`expr $n + 1`
-
-# Disabling this test, as it checks for looking up glue in a different zone
-# finder than the answer is from. This is not supported now.
-#echo "I:testing that we find glue A RRs we are authoritative for ($n)"
-#$DIG +norec @10.53.0.1 -p 53210 foo.bar.example.org. a >dig.out.$n || status=1
-#$PERL $DIGCOMP auth.good dig.out.$n || status=1
-#n=`expr $n + 1`
-
-# We cannot do this test for BIND 10 because b10-auth doesn't act as a
-# recursive (caching) server (by design)
-# echo "I:testing that we find glue A/AAAA RRs in the cache ($n)"
-# $DIG +norec @10.53.0.1 -p 53210 foo.bar.yy. a >dig.out.$n || status=1
-# $PERL $DIGCOMP yy.good dig.out.$n || status=1
-# n=`expr $n + 1`
-
-echo "I:testing that we don't find out-of-zone glue ($n)"
-$DIG +norec @10.53.0.1 -p 53210 example.net. a > dig.out.$n || status=1
-$PERL $DIGCOMP noglue.good dig.out.$n || status=1
-n=`expr $n + 1`
-
-# This test currently fails (additional section will be empty, which is
-# incorrect).  See Trac ticket #646.
-#echo "I:testing that we are finding partial out-of-zone glue ($n)"
-#$DIG +norec @10.53.0.1 -p 53210 foo.bar.test. a >dig.out.$n || status=1
-#$PERL $DIGCOMP test.good dig.out.$n || status=1
-#n=`expr $n + 1`
-
-echo "I:exit status: $status"
-exit $status

+ 0 - 226
tests/system/ifconfig.sh

@@ -1,226 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2004, 2007-2010  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.
-
-#
-# Set up interface aliases for bind9 system tests.
-#
-# IPv4: 10.53.0.{1..7}				RFC 1918
-# IPv6: fd92:7065:b8e:ffff::{1..7}		ULA
-#
-
-config_guess=""
-for f in ./config.guess ../../config.guess
-do
-	if test -f $f
-	then
-		config_guess=$f
-	fi
-done
-
-if test "X$config_guess" = "X"
-then
-	cat <<EOF >&2
-$0: must be run from the top level source directory or the
-bin/tests/system directory
-EOF
-	exit 1
-fi
-
-# If running on hp-ux, don't even try to run config.guess.
-# It will try to create a temporary file in the current directory,
-# which fails when running as root with the current directory
-# on a NFS mounted disk.
-
-case `uname -a` in
-  *HP-UX*) sys=hpux ;;
-  *) sys=`sh $config_guess` ;;
-esac
-
-case "$2" in
-[0-9]|[1-9][0-9]|[1-9][0-9][0-9]) base=$2;;
-*) base=""
-esac
-
-case "$3" in
-[0-9]|[1-9][0-9]|[1-9][0-9][0-9]) base6=$2;;
-*) base6=""
-esac
-
-case "$1" in
-
-    start|up)
-	for ns in 1 2 3 4 5 6 7 8
-	do
-		if test -n "$base"
-		then
-			int=`expr $ns + $base - 1`
-		else
-			int=$ns
-		fi
-		if test -n "$base6"
-		then
-			int6=`expr $ns + $base6 - 1`
-		else
-			int6=$ns
-		fi
-		case "$sys" in
-		    *-pc-solaris2.5.1)
-			ifconfig lo0:$int 10.53.0.$ns netmask 0xffffffff up
-			;;
-		    *-sun-solaris2.[6-7])
-			ifconfig lo0:$int 10.53.0.$ns netmask 0xffffffff up
-			;;
-		    *-*-solaris2.[8-9]|*-*-solaris2.1[0-9])
-			/sbin/ifconfig lo0:$int plumb
-			/sbin/ifconfig lo0:$int 10.53.0.$ns up
-			if test -n "$int6"
-			then
-				/sbin/ifconfig lo0:$int6 inet6 plumb
-				/sbin/ifconfig lo0:$int6 \
-					inet6 fd92:7065:b8e:ffff::$ns up
-			fi
-			;;
-		    *-*-linux*)
-			ifconfig lo:$int 10.53.0.$ns up netmask 255.255.255.0
-			ifconfig lo inet6 add fd92:7065:b8e:ffff::$ns/64
-		        ;;
-		    *-unknown-freebsd*)
-			ifconfig lo0 10.53.0.$ns alias netmask 0xffffffff
-			ifconfig lo0 inet6 fd92:7065:b8e:ffff::$ns alias
-			;;
-		    *-unknown-netbsd*)
-			ifconfig lo0 10.53.0.$ns alias netmask 255.255.255.0
-			ifconfig lo0 inet6 fd92:7065:b8e:ffff::$ns alias
-			;;
-		    *-unknown-openbsd*)
-			ifconfig lo0 10.53.0.$ns alias netmask 255.255.255.0
-			ifconfig lo0 inet6 fd92:7065:b8e:ffff::$ns alias
-			;;
-		    *-*-bsdi[3-5].*)
-			ifconfig lo0 add 10.53.0.$ns netmask 255.255.255.0
-			;;
-		    *-dec-osf[4-5].*)
-			ifconfig lo0 alias 10.53.0.$ns
-			;;
-		    *-sgi-irix6.*)
-			ifconfig lo0 alias 10.53.0.$ns
-			;;
-		    *-*-sysv5uw7*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
-			ifconfig lo0 10.53.0.$ns alias netmask 0xffffffff
-			;;
-		    *-ibm-aix4.*|*-ibm-aix5.*)
-			ifconfig lo0 alias 10.53.0.$ns
-			ifconfig lo0 inet6 alias -dad fd92:7065:b8e:ffff::$ns/64
-			;;
-		    hpux)
-			ifconfig lo0:$int 10.53.0.$ns netmask 255.255.255.0 up
-			ifconfig lo0:$int inet6 fd92:7065:b8e:ffff::$ns up
-		        ;;
-		    *-sco3.2v*)
-			ifconfig lo0 alias 10.53.0.$ns
-			;;
-		    *-darwin*)
-			ifconfig lo0 alias 10.53.0.$ns
-			ifconfig lo0 inet6 fd92:7065:b8e:ffff::$ns alias
-			;;
-	            *)
-			echo "Don't know how to set up interface.  Giving up."
-			exit 1
-		esac
-	done
-	;;
-
-    stop|down)
-	for ns in 8 7 6 5 4 3 2 1
-	do
-		if test -n "$base"
-		then
-			int=`expr $ns + $base - 1`
-		else
-			int=$ns
-		fi
-		case "$sys" in
-		    *-pc-solaris2.5.1)
-			ifconfig lo0:$int 0.0.0.0 down
-			;;
-		    *-sun-solaris2.[6-7])
-			ifconfig lo0:$int 10.53.0.$ns down
-			;;
-		    *-*-solaris2.[8-9]|*-*-solaris2.1[0-9])
-			ifconfig lo0:$int 10.53.0.$ns down
-			ifconfig lo0:$int 10.53.0.$ns unplumb
-			if test -n "$int6"
-			then
-				ifconfig lo0:$int6 inet6 down
-				ifconfig lo0:$int6 inet6 unplumb
-			fi
-			;;
-		    *-*-linux*)
-			ifconfig lo:$int 10.53.0.$ns down
-			ifconfig lo inet6 del fd92:7065:b8e:ffff::$ns/64
-		        ;;
-		    *-unknown-freebsd*)
-			ifconfig lo0 10.53.0.$ns delete
-			ifconfig lo0 inet6 fd92:7065:b8e:ffff::$ns delete
-			;;
-		    *-unknown-netbsd*)
-			ifconfig lo0 10.53.0.$ns delete
-			ifconfig lo0 inet6 fd92:7065:b8e:ffff::$ns delete
-			;;
-		    *-unknown-openbsd*)
-			ifconfig lo0 10.53.0.$ns delete
-			ifconfig lo0 inet6 fd92:7065:b8e:ffff::$ns delete
-			;;
-		    *-*-bsdi[3-5].*)
-			ifconfig lo0 remove 10.53.0.$ns
-			;;
-		    *-dec-osf[4-5].*)
-			ifconfig lo0 -alias 10.53.0.$ns
-			;;
-		    *-sgi-irix6.*)
-			ifconfig lo0 -alias 10.53.0.$ns
-			;;
-		    *-*-sysv5uw7*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
-			ifconfig lo0 -alias 10.53.0.$ns
-			;;
-		    *-ibm-aix4.*|*-ibm-aix5.*)
-			ifconfig lo0 delete 10.53.0.$ns
-			ifconfig lo0 delete inet6 fd92:7065:b8e:ffff::$ns/64
-			;;
-		    hpux)
-			ifconfig lo0:$int 0.0.0.0
-			ifconfig lo0:$int inet6 ::
-		        ;;
-		    *-sco3.2v*)
-			ifconfig lo0 -alias 10.53.0.$ns
-			;;
-		    *darwin*)
-			ifconfig lo0 -alias 10.53.0.$ns
-			ifconfig lo0 inet6 fd92:7065:b8e:ffff::$ns delete
-			;;
-	            *)
-			echo "Don't know how to destroy interface.  Giving up."
-			exit 1
-		esac
-	done
-
-	;;
-
-	*)
-		echo "Usage: $0 { up | down } [base]"
-		exit 1
-esac

+ 0 - 8
tests/system/ixfr/.gitignore

@@ -1,8 +0,0 @@
-/b10-config.db
-/common_tests.sh
-/db.example.n0
-/db.example.n2
-/db.example.n2.refresh
-/db.example.n4
-/db.example.n6
-/ixfr_init.sh

+ 0 - 86
tests/system/ixfr/README

@@ -1,86 +0,0 @@
-Introduction
-============
-The directories in-1 to in-4 implement the following tests of the IXFR-in
-capability of BIND 10.
-
-in-1: Check that BIND 10 can receive IXFR in a single UDP packet.
-in-2: Check that BIND 10 can receive IXFR via TCP.
-in-3: Check that BIND 10 will request AXFR if the server does not support IXFR.
-in-4: Check that BIND 10 will request IXFR when its SOA refresh times out
-
-The tests are described more fully in the document:
-
-http://bind10.isc.org/wiki/IxfrSystemTests
-
-Overview
-========
-All the tests use two nameservers:
-
-* A BIND 9 nameserver acting as the IXFR server (using the nomenclature
-of RFC 1995).
-* A BIND 10 nameserver acting at the IXFR client.
-
-In general, the tests attempt to set up the server and client independently.
-Communication is established between the systems by updating their
-configurations and a notification sent to the client.  This should cause the
-client to request an IXFR from the server. (The exception is test 4, where the
-request is a result of the expiration of the SOA refresh time.)
-
-A check of zone files - or in these tests, of SOA serial number - can only
-reveal that a transfer has taken place.  To check what has happened,
-e.g. whether the transfer was via UDP or whether a TCP request took place,
-the BIND 10 log file is searched for known message IDs.
-
-The searching of the log files for message IDs is one of the reasons that,
-unlike other system tests, the IXFR set of tests is broken up into separate
-tests that require the stopping and starting of nameservers (and tidying up of
-log files) between each test.  Doing this means that only the existence of a
-particular message ID needs to be checked - there is no risk that another test
-produced it.  The other reason is that the each IXFR test requires the
-nameservers to be in a specific state at the start of the test; this is easier
-to assure if they are not updating one another as the result of configuration
-settings established in the previous test.
-
-Test Files
-==========
-
-Data Files
-----------
-(All within tests/system/ixfr.  Some .in files are processed to substitute
-for build variables in the build process to give the files listed here.)
-
-db.example.nX. These files hold the RRs for a zone for which should not
-fit within a single UDP packet.  The files are different versions of the zone
-- the N-0 version (i.e. the latest version - "N" - the "-0" is present so
-that the files have a consistent name), N-2 etc. (See the full description
-of the tests for the meaning of N-2 etc.)
-
-db.example.common: A set of RRs to bulk out the zone to be larger than can
-be contained in a single UDP packet.
-
-db.example.n2.refresh: The N-2 version of the zone, but with a small SOA
-refresh time (for test 4).
-
-named_xxxx.conf: Various BIND 9 configuration files with NOTIFYs and/or
-IXFR enabled or disabled.
-
-Directories
------------
-The tests/system/ixfr directory holds the IXFR tests.  Within that
-directory are subdirectories in-1 through in-4 for each test.  And within
-each test directory are the directories ns1 (for the BIND 9 nameserver)
-and nsx2 (for the BIND 10 nameserver).
-
-Shell Scripts
--------------
-The IXFR tests use the same framework as the rest of the system tests,
-being based around shell scripts.  Many have a ".in" form as they require
-substitution of build variables before they can be used, and so are
-listed in configure.ac.  The files specific to the IXFR tests are:
-
-tests/system/ixfr/ixfr_init.sh.in: defines environment variables and shell
-subroutines used in the tests.  (This references system/conf.sh.in which
-defines most of them.)
-
-tests/system/ixfr/common_tests.sh.in: tests in-1 and in-2 are virtually
-identical - this holds the common code.

+ 0 - 51
tests/system/ixfr/b10-config.db.in

@@ -1,51 +0,0 @@
-{"version": 2,
-    "Xfrin": {
-        "zones": [{
-            "master_addr": "10.53.0.1",
-            "master_port": 53210,
-            "name": "example.",
-            "use_ixfr": true
-        }]
-    },
-    "Auth": {
-        "listen_on": [{
-            "address": "10.53.0.2",
-            "port": 53210
-        }],
-        "database_file": "@abs_builddir@/zone.sqlite3"
-    },
-    "data_sources": {
-        "classes": {
-            "IN": [{
-                "type": "sqlite3",
-                "params": {
-                    "database_file": "@abs_builddir@/zone.sqlite3"
-                }
-            }]
-        }
-    },
-    "Logging": {
-        "loggers": [{
-            "name": "*",
-            "severity": "DEBUG",
-            "output_options": [],
-            "debuglevel": 99
-        }]
-    },
-    "Zonemgr": {
-        "secondary_zones": [{
-            "name": "example.",
-            "class": "IN"
-        }]
-    },
-    "Init": {
-        "components": {
-            "b10-auth": {"kind": "needed", "special": "auth" },
-            "b10-xfrin": { "address": "Xfrin", "kind": "dispensable" },
-            "b10-xfrout": { "address": "Xfrout", "kind": "dispensable" },
-            "b10-zonemgr": { "address": "Zonemgr", "kind": "dispensable" },
-            "b10-stats": { "address": "Stats", "kind": "dispensable" },
-            "b10-cmdctl": { "special": "cmdctl", "kind": "needed" }
-        }
-    }
-}

+ 0 - 28
tests/system/ixfr/clean_ns.sh

@@ -1,28 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2011  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.
-
-# Clean up nameserver directories after zone transfer tests.
-
-rm -f ns1/named.conf
-rm -f ns1/db.example*
-rm -f ns1/named.memstats
-
-rm -f nsx2/bind10.run
-rm -f nsx2/b10-config.db
-rm -f ../zone.sqlite3
-
-rm -f client.dig
-rm -f server.dig

+ 0 - 78
tests/system/ixfr/common_tests.sh.in

@@ -1,78 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2011  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.
-
-# \file
-# This script is used in a couple of IXFR tests.
-#
-# Preconditions:\n
-# The BIND 9 nameserver (ns1, 10.53.0.1, acting as the IXFR server) is loaded
-# with the N-4 version of the zone.  (It may hold prior versions as well.)
-# Notifications are disabled.
-#
-# The BIND 10 nameserver (nsx2, 10.53.0.2, acting as the IXFR client) is loaded
-# with an earlier (unspecified) version of the zone.
-#
-# Actions:\n
-# This script updates the IXFR server with the N-2 and N-0 versions of the zone.
-# It then updates the BIND 10 configuration so that it looks for IXFRs from
-# the IXFR server and causes the server to send the client a NOTIFY.  After
-# waiting for the client to update from the server, it compares ther zones of
-# the two system, reporting an error if they are different.
-#
-# Caller Actions:\n
-# The caller can pre-load the BIND 10 IXFR client with whatever version of the
-# zone it requires.  It can also load the BIND 9 IXFR server with zones earlier
-# than N-4.
-#
-# After this test has finished, it is up to the caller to check the logs
-# to see if they report the expected behavior.
-#
-# \return 0 if the script executed successfully, non-zero otherwise
-
-# Set up variables etc.
-. @abs_top_builddir@/tests/system/conf.sh
-. $IXFR_TOP/ixfr_init.sh
-
-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}'`
-echo "I:$CLIENT_NAME SOA serial of IXFR client is $old_client_serial"
-
-# Load the BIND 9 system (the IXFR server) with the "n - 2" and "n" version of
-# the zones.  With ixfr-from-differences set to "yes", the nameserver should
-# generate the differences between them.
-echo "I:$SERVER_NAME updating IXFR-server for ixfr-in tests"
-update_server_zone $SERVER_NAME $SERVER_IP $IXFR_TOP/db.example.n2
-
-# 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/db.example.n0
-
-echo "I:$CLIENT_NAME forcing IXFR client to retrieve new version of the zone"
-$RUN_BINDCTL << .
-Xfrin retransfer zone_name="example"
-.
-
-# Wait for the client to update itself.
-wait_for_update $CLIENT_NAME $CLIENT_IP $old_client_serial
-
-# Has updated, compare the client and server's versions of the zone s- they
-# should be the same.
-compare_zones $SERVER_NAME $SERVER_IP $CLIENT_NAME $CLIENT_IP
-
-set +e

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 1556
tests/system/ixfr/db.example.common


+ 0 - 29
tests/system/ixfr/db.example.n0.in

@@ -1,29 +0,0 @@
-; Copyright (C) 2011  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.
-
-$ORIGIN example.
-$TTL 3600
-
-@       IN	SOA	ns1.example. hostmaster.example. 100 3600 900 7200 300
-
-        IN	NS	ns1.example.
-        IN	NS	ns2.example.
-
-ns1     IN  A   192.0.2.1
-ns2     IN  A   192.0.2.2
-
-a-1     IN  A   192.0.2.101
-b-1     IN  A   192.0.2.201
-
-$INCLUDE @abs_top_builddir@/tests/system/ixfr/db.example.common

+ 0 - 28
tests/system/ixfr/db.example.n2.in

@@ -1,28 +0,0 @@
-; Copyright (C) 2011  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.
-
-$ORIGIN example.
-$TTL 3600
-
-@       IN	SOA	ns1.example. hostmaster.example. 98 3600 900 7200 300
-
-        IN	NS	ns1.example.
-        IN	NS	ns2.example.
-
-ns1     IN  A   192.0.2.1
-ns2     IN  A   192.0.2.2
-
-a-1     IN  A   192.0.2.101
-
-$INCLUDE @abs_top_builddir@/tests/system/ixfr/db.example.common

+ 0 - 28
tests/system/ixfr/db.example.n2.refresh.in

@@ -1,28 +0,0 @@
-; Copyright (C) 2011  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.
-
-$ORIGIN example.
-$TTL 3600
-
-@       IN	SOA	ns1.example. hostmaster.example. 98 30 2 7200 300
-
-        IN	NS	ns1.example.
-        IN	NS	ns2.example.
-
-ns1     IN  A   192.0.2.1
-ns2     IN  A   192.0.2.2
-
-a-1     IN  A   192.0.2.101
-
-$INCLUDE @abs_top_builddir@/tests/system/ixfr/db.example.common

+ 0 - 31
tests/system/ixfr/db.example.n4.in

@@ -1,31 +0,0 @@
-; Copyright (C) 2011  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.
-
-$ORIGIN example.
-$TTL 3600
-
-@       IN	SOA	ns1.example. hostmaster.example. 96 3600 900 7200 300
-
-        IN	NS	ns1.example.
-        IN	NS	ns2.example.
-
-ns1     IN  A   192.0.2.1
-ns2     IN  A   192.0.2.2
-
-a-1     IN  A   192.0.2.101
-a-2     IN  A   192.0.2.102
-b-1     IN  A   192.0.2.201
-b-2     IN  A   192.0.2.202
-
-$INCLUDE @abs_top_builddir@/tests/system/ixfr/db.example.common

+ 0 - 29
tests/system/ixfr/db.example.n6.in

@@ -1,29 +0,0 @@
-; Copyright (C) 2011  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.
-
-$ORIGIN example.
-$TTL 3600
-
-@       IN	SOA	ns1.example. hostmaster.example. 94 3600 900 7200 300
-
-        IN	NS	ns1.example.
-        IN	NS	ns2.example.
-
-ns1     IN  A   192.0.2.1
-ns2     IN  A   192.0.2.2
-
-a-1     IN  A   192.0.2.101
-a-2     IN  A   192.0.2.102
-b-1     IN  A   192.0.2.201
-b-2     IN  A   192.0.2.202

+ 0 - 1
tests/system/ixfr/in-1/.gitignore

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

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

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

+ 0 - 3
tests/system/ixfr/in-1/ns1/README

@@ -1,3 +0,0 @@
-This directory should be empty. A README file is placed here to ensure git
-notes the directory's presence.  It can be removed if other files are placed
-here.

+ 0 - 3
tests/system/ixfr/in-1/nsx2/README

@@ -1,3 +0,0 @@
-This directory should be empty. A README file is placed here to ensure git
-notes the directory's presence.  It can be removed if other files are placed
-here.

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

@@ -1,30 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2004, 2007, 2011  Internet Systems Consortium, Inc. ("ISC")
-# Copyright (C) 2001, 2002  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.
-
-. @abs_top_builddir@/tests/system/conf.sh
-
-# Clean up from last time
-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 $IXFR_TOP/named_nonotify.conf ns1/named.conf
-cp -f $IXFR_TOP/db.example.n4 ns1/db.example
-
-# Set up the IXFR client - load the same version of the zone.
-cp -f $IXFR_TOP/b10-config.db nsx2/b10-config.db
-${B10_LOADZONE} -c "{\"database_file\": \"$IXFR_TOP/zone.sqlite3\"}" example. $IXFR_TOP/db.example.n4

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

@@ -1,37 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2011  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.
-
-# \file
-# This script performs the first IXFR-IN test.  A BIND 9 nameserver (the
-# "server") contains a version of the zone (version N) and two previous
-# versions, N-2 and N-4.  A BIND 10 nameserver (the "client") is loaded with
-# version N-4 of the zone.  A NOTIFY is sent to it, and it is expected that
-# it will send an IXFR to the server and update itself with the latest version
-# of the zone.  (The changes are such that the update should be in the form of
-# a single UDP packet.)
-#
-# The pre-requisites for this test are the same as for the common tests, so
-# we can execute that directly.
-
-. ../common_tests.sh
-status=$?
-
-# TODO: Check the BIND 10 log, looking for the IXFR messages that indicate that
-# it has initiated an IXFR and that it received the update within a single
-# packet.
-
-echo "I:exit status: $status"
-exit $status

+ 0 - 1
tests/system/ixfr/in-2/.gitignore

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

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

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

+ 0 - 1
tests/system/ixfr/in-2/ns1/.gitignore

@@ -1 +0,0 @@
-/named.run

+ 0 - 3
tests/system/ixfr/in-2/ns1/README

@@ -1,3 +0,0 @@
-This directory should be empty. A README file is placed here to ensure git
-notes the directory's presence.  It can be removed if other files are placed
-here.

+ 0 - 1
tests/system/ixfr/in-2/nsx2/.gitignore

@@ -1 +0,0 @@
-/bindctl.out

+ 0 - 3
tests/system/ixfr/in-2/nsx2/README

@@ -1,3 +0,0 @@
-This directory should be empty. A README file is placed here to ensure git
-notes the directory's presence.  It can be removed if other files are placed
-here.

+ 0 - 29
tests/system/ixfr/in-2/setup.sh.in

@@ -1,29 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2011  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.
-
-. @abs_top_builddir@/tests/system/conf.sh
-
-# Clean up from last time
-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 disables notifies.
-cp -f $IXFR_TOP/named_nonotify.conf ns1/named.conf
-cp -f $IXFR_TOP/db.example.n6 ns1/db.example
-
-# Set up the IXFR client - load an earlier version of the zone
-cp -f $IXFR_TOP/b10-config.db nsx2/b10-config.db
-${B10_LOADZONE} -c "{\"database_file\": \"$IXFR_TOP/zone.sqlite3\"}" example. $IXFR_TOP/db.example.n6

+ 0 - 81
tests/system/ixfr/in-2/tests.sh

@@ -1,81 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2011  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.
-
-# \file
-# This script performs the first IXFR-IN test.  A BIND 9 nameserver (the
-# "server") contains a version of the zone (version N) and three previous
-# versions, N-2, N-4 and N-6.  A BIND 10 nameserver (the "client") is loaded
-# with version N-6 of the zone.  A NOTIFY is sent to it, and it is expected that
-# it will send an IXFR to the server and update itself with the latest version
-# of the zone.  (The changes are such that the update will have to take place
-# over TCP.)
-
-. ../ixfr_init.sh
-
-# On entry, the IXFR server is at version N-6.  The common tests assume that
-# it is an N-4, so update it.
-echo "I:$SERVER_NAME updating IXFR-server to suitable start version"
-update_server_zone $SERVER_NAME $SERVER_IP $IXFR_TOP/db.example.n4
-if [ $? -ne 0 ];
-then
-    exit 1
-fi
-
-# The pre-requisites for this test are the same as for the common tests, so
-# we can execute that directly.
-. ../common_tests.sh
-if [ $? -ne 0 ];
-then
-    exit 1
-fi
-
-# TEMPORARY: at the time of writing (October 2011) BIND 10 does not attempt
-# a UDP transfer first.  Therefore just check for TCP transfer.
-
-# Check that the client initiated and completed an IXFR.  Use a simple grep as
-# the syntax and capabilities of egrep may vary between systems.
-grep XFRIN_XFR_TRANSFER_STARTED nsx2/bind10.run | grep IXFR > /dev/null
-if [ $? -ne 0 ];
-then
-    echo "R:$CLIENT_NAME FAIL no 'IXFR started' message in the BIND 10 log"
-    exit 1
-fi
-
-grep XFRIN_IXFR_TRANSFER_SUCCESS nsx2/bind10.run | grep IXFR > /dev/null
-if [ $? -ne 0 ];
-then
-    echo "R:$CLIENT_NAME FAIL no 'IXFR successful' message in the BIND 10 log"
-    exit 1
-fi
-
-# Look in the named log file to see if a TCP IXFR was requested.  Again use a
-# simple grep.
-grep "transfer of" ns1/named.run | grep "sending TCP message" > /dev/null
-if [ $? -ne 0 ];
-then
-    echo "R:$SERVER_NAME FAIL no 'sending TCP' message in the BIND 9 log"
-    exit 1
-fi
-
-grep "IXFR ended" ns1/named.run > /dev/null
-if [ $? -ne 0 ];
-then
-    echo "R:$SERVER_NAME FAIL no 'IXFR ended' message in the BIND 9 log"
-    exit 1
-fi
-
-echo "I:exit status: 0"
-exit 0

+ 0 - 1
tests/system/ixfr/in-3/.gitignore

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

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

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

+ 0 - 3
tests/system/ixfr/in-3/ns1/README

@@ -1,3 +0,0 @@
-This directory should be empty. A README file is placed here to ensure git
-notes the directory's presence.  It can be removed if other files are placed
-here.

+ 0 - 3
tests/system/ixfr/in-3/nsx2/README

@@ -1,3 +0,0 @@
-This directory should be empty. A README file is placed here to ensure git
-notes the directory's presence.  It can be removed if other files are placed
-here.

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

@@ -1,29 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2011  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.
-
-. @abs_top_builddir@/tests/system/conf.sh
-# Clean up from last time
-
-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/db.example.n0 ns1/db.example
-
-# Set up the IXFR client - load a previous version of the zone.
-cp -f $IXFR_TOP/b10-config.db nsx2/b10-config.db
-${B10_LOADZONE} -c "{\"database_file\": \"$IXFR_TOP/zone.sqlite3\"}" example. $IXFR_TOP/db.example.n2

+ 0 - 66
tests/system/ixfr/in-3/tests.sh

@@ -1,66 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2011  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.
-
-# \file
-# This script performs the third IXFR-IN test.  A BIND 9 nameserver (the
-# "server") contains a version of the zone (version N) and has IXFRs disabled.
-# A BIND 10 nameserver (the "client") is loaded with version N-2 of the zone.
-# A NOTIFY is sent to it, and it is expected that it will send an IXFR to the
-# server; the server should not respond to the request, so the client should
-# then send an AXFR request and receive the latest copy of the zone.
-
-# TODO It seems bind9 still allows IXFR even when provide-ixfr on;
-
-. ../ixfr_init.sh
-status=$?
-
-# Store the SOA serial number of the BIND 10 client for later use.
-old_client_serial=`$DIG_SOA @$CLIENT_IP | $AWK '{print $3}'`
-echo "I:SOA serial of IXFR client $CLIENT_NAME is $old_client_serial"
-
-# If required, get the IXFR server to notify the IXFR client of the new zone.
-# 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"
-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 + $?`
-
-# Check the log there's the IXFR and fallback
-grep XFRIN_XFR_TRANSFER_STARTED nsx2/bind10.run | grep IXFR
-if [ $? -ne 0 ];
-then
-    echo "R:$CLIENT_NAME FAIL no 'IXFR started' message in the BIND 10 log"
-    exit 1
-fi
-
-grep XFRIN_XFR_TRANSFER_FALLBACK nsx2/bind10.run
-if [ $? -ne 0 ];
-then
-    echo "R:$CLIENT_NAME FAIL no fallback message in BIND10 log"
-    exit 1
-fi
-
-echo "I:exit status: $status"
-exit $status

+ 0 - 1
tests/system/ixfr/in-4/.gitignore

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

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

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

+ 0 - 3
tests/system/ixfr/in-4/ns1/README

@@ -1,3 +0,0 @@
-This directory should be empty. A README file is placed here to ensure git
-notes the directory's presence.  It can be removed if other files are placed
-here.

+ 0 - 3
tests/system/ixfr/in-4/nsx2/README

@@ -1,3 +0,0 @@
-This directory should be empty. A README file is placed here to ensure git
-notes the directory's presence.  It can be removed if other files are placed
-here.

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

@@ -1,30 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2011  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.
-
-. @abs_top_builddir@/tests/system/conf.sh
-# Clean up from last time
-
-sh clean.sh
-
-# Set up the initial version of the ixfr server - load the last-but-one version
-# of the zone.
-cp $IXFR_TOP/named_nonotify.conf ns1/named.conf
-cp -f $IXFR_TOP/db.example.n2.refresh ns1/db.example
-
-# Set up the IXFR client - load a previous version of the zone with a short
-# refresh time.
-cp -f $IXFR_TOP/b10-config.db nsx2/b10-config.db
-${B10_LOADZONE} -c "{\"database_file\": \"$IXFR_TOP/zone.sqlite3\"}" example. $IXFR_TOP/db.example.n2.refresh

+ 0 - 53
tests/system/ixfr/in-4/tests.sh

@@ -1,53 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2011  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.
-
-# \file
-# This script performs the fourth IXFR-IN test.  A BIND 9 nameserver (the
-# "server") contains a version of the zone (version N) and has IXFRs enabled.
-# A BIND 10 nameserver (the "client") is loaded with version N-2 of the zone
-# and a small refresh time.  After this expires, the IXFR client should send
-# an IXFR request to the IXFR server.
-
-. ../ixfr_init.sh
-status=$?
-
-# Ensure the server has the latest copy of the zone.  The implicit assumption
-# here is that starting the two systems and reloading the IXFR server takes
-# less time than the SOA refresh time set in the "db.example.n2.refresh" zone
-# file.
-cp $IXFR_TOP/db.example.n0 ns1/db.example
-do_rndc $SERVER_NAME $SERVER_IP reload
-
-# Store the SOA serial number of the BIND 10 client for later use.
-old_client_serial=`$DIG_SOA @$CLIENT_IP | $AWK '{print $3}'`
-echo "I:SOA serial of IXFR client $CLIENT_NAME is $old_client_serial"
-
-# Wait for the client to update itself. 30 seconds has been given as the
-# refresh interface and 2 seconds as the retry interval.  The wait_for_update
-# function will check for up to a minute looking for the new serial.
-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 + $?`
-
-# TODO: Check the BIND 10 log, looking for the IXFR messages that indicate that
-# the client has initiated the IXFR.
-
-echo "I:exit status: $status"
-exit $status

+ 0 - 330
tests/system/ixfr/ixfr_init.sh.in

@@ -1,330 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2011  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.
-
-# \file
-# This file should be run by all IXFR tests before doing anything else.  It
-# includes the main configuration script to set the environment variables as
-# well as defining useful shell subroutines.
-
-. @abs_top_builddir@/tests/system/conf.sh
-
-# Useful symbols used in the IXFR tests.
-
-# Short-hand for getting SOA - just supply address of the server
-DIG_SOA="$DIG +norecurse +short -p $DNS_PORT example. SOA"
-
-# All IXFR tests use a BIND 9 server serving a BIND 10 client.  These have the
-# smae name and use the same address in all tests.
-SERVER_NAME=ns1
-SERVER_IP=10.53.0.1   # BIND 9
-
-CLIENT_NAME=nsx2
-CLIENT_IP=10.53.0.2   # BIND 10
-
-# \brief Check Arguments
-#
-# Most functions take the name of  nameserver as the first argument and its IP
-# address as the second.  This function is passed "$*" and just checks that
-# both $1 and $2 are defined.
-#
-# \arg $* Arguments passed to caller
-#
-# \return status 0 => $1 and $2 are defined, 1 => they are not.
-check_name_ip() {
-
-    if [ "$1" = "" ];
-    then
-        echo "R:FAIL name of server not supplied"
-        return 1
-    fi
-
-    if [ "$2" = "" ];
-    then
-        echo "R:FAIL IP address of server not supplied"
-        return 1
-    fi
-
-    return 0
-}
-
-
-# \brief Perform RNDC Command
-#
-# Controls the BIND 9 IXFR server.  Called do_rndc (instead of rndc) to avoid
-# confusion if rndc itself is in the search path.
-#
-# \arg $1 - Name of the server (ns1, nsx2 etc.)
-# \arg $2 - IP address of the server
-# \arg $* - Command to execute (which may be multiple tokens)
-#
-# \return 0 on success, 1 on failure (in which case an error message will
-#         have been output).
-do_rndc () {
-
-    # If the following checks fail, the code is wrong.
-
-    check_name_ip $*
-    if [ $? -ne 0 ];
-    then
-        echo "R:FAIL do_rndc - name or ip address of server not supplied"
-        return 1
-    fi
-
-    name=$1
-    shift
-    ip=$1
-    shift
-
-    if [ "$1" = "" ];
-    then
-        echo "R:FAIL do_rndc - rndc command not supplied"
-        return 1
-    fi
-    
-    $RNDC -c $SYSTEM_TOP/common/rndc.conf -s $ip -p $RNDC_PORT $* 2>&1 \
-        | sed "s/^/I:$name /"
-}
-
-# \brief Wait for update
-#
-# Given a serial number and a server, poll the nameserver until the SOA serial
-# number is different from that given.  The poll takes place every five seconds
-# for a minute.
-#
-# \arg $1 - Name of the server
-# \arg $2 - IP address of the server
-# \arg $3 - Serial number to check against
-#
-# \return 0 if the serial number is different (requires another poll to obtain
-#         it), 1 if the serial number has not changed after one minute.
-wait_for_update() {
-
-    # If the following checks fail, the code is wrong.
-
-    check_name_ip $*
-    if [ $? -ne 0 ];
-    then
-        echo "R:FAIL wait_for_update - name or ip address of system not supplied"
-        return 1
-
-    fi
-
-    name=$1
-    shift
-    ip=$1
-    shift
-
-    serial=$1
-    if [ "$serial" = "" ];
-    then
-        echo "R:FAIL wait_for_update - serial number not supplied"
-        return 1
-    fi
-
-    # Now poll the server looking for the new serial number
-
-    echo "I:$name waiting for SOA serial to change from $serial"
-    for i in 1 2 3 4 5 6 7 8 9 10 11 12
-    do
-        if [ $i -gt 1 ];
-        then
-            sleep 5
-        fi
-
-        new_serial=`$DIG_SOA @$ip | $AWK '{print $3}'`
-        if [ "$new_serial" != "$serial" ];
-        then
-            echo "I:$name SOA serial was at $serial, now at $new_serial"
-            return 0
-        fi
-    done
-
-    echo "R:$name FAIL serial number has not updated"
-    return 1
-}
-
-
-
-# \brief Update server zone
-#
-# Reloads the example. zone in the BIND 9 IXFR server and waits a maximum of
-# one minute for it to be served.
-#
-# \arg $1 - Name of the server (ns1, nsx2 etc.)
-# \arg $2 - IP address of the server
-# \arg $3 - Zone file to load
-# \arg $* - Command to execute (which may be multiple tokens)
-#
-# \return 0 on success, 1 on failure (for which an error message will have
-#         been output).
-update_server_zone() {
-
-    # If the following checks fail, the code is wrong.
-
-    check_name_ip $*
-    if [ $? -ne 0 ];
-    then
-        echo "R:FAIL update_server_zone - name or ip address of server not supplied"
-        return 1
-    fi
-
-    name=$1
-    shift
-    ip=$1
-    shift
-
-    file=$1
-    shift
-    if [ "$file" = "" ];
-    then
-        echo "R:FAIL update_server_zone - new zone file not supplied"
-        return 1
-    fi
-
-    if [ ! -e $file ];
-    then
-        echo "R:FAIL update_server_zone - zone file does not exist: $file"
-        return 1
-    fi
-
-    old_serial=`$DIG_SOA @$ip | $AWK '{print $3}'`
-
-    echo "I:$name IXFR server loading $file"
-    cp $file $name/db.example
-    do_rndc $name $ip reload
-    if [ $? -ne 0 ];
-    then
-        return 1    # Message will have already been output
-    fi
-
-    wait_for_update $name $ip $old_serial
-    if [ $? -ne 0 ];
-    then
-        echo "R:$name FAIL IXFR server did not update zone after reload"
-        return 1
-    fi
-    new_serial=`$DIG_SOA @$ip | $AWK '{print $3}'`
-
-    return 0
-}
-
-# \brief Compare client and server SOAs
-#
-# Checks the SOAs of two systems and reports if they are not equal.
-#
-# \arg $1 Name of the IXFR server
-# \arg $2 IP of the IXFR server 
-# \arg $3 Name of the IXFR client
-# \arg $4 IP of the IXFR client
-#
-# \return 0 if the systems have the same SOA, 1 if not.  In the latter case,
-#         an error will be output.
-compare_soa() {
-
-    # If the following checks fail, the code is wrong.
-
-    check_name_ip $*
-    if [ $? -ne 0 ];
-    then
-        echo "R:FAIL compare_soa - name or ip address of server not supplied"
-        return 1
-    fi
-
-    server_name=$1
-    shift
-    server_ip=$1
-    shift
-
-    check_name_ip $*
-    if [ $? -ne 0 ];
-    then
-        echo "R:FAIL compare_soa - name or ip address of client not supplied"
-        return 1
-    fi
-
-    client_name=$1
-    shift
-    client_ip=$1
-    shift
-
-    client_serial=`$DIG_SOA @$client_ip | $AWK '{print $3}'`
-    server_serial=`$DIG_SOA @$server_ip | $AWK '{print $3}'`
-    if [ "$client_serial" != "$server_serial" ];
-    then
-        echo "R:FAIL client $client_name serial $client_serial not same as server $server_name serial $server_serial"
-        return 1
-    fi
-
-    return 0
-}
-
-# \brief Compare client and server zones
-#
-# Checks the zones of two systems and reports if they are not identical.
-#
-# The check is simplistic. Each zone is listed via "dig", after which comment
-# lines, blank lines and spaces/tabs are removed, and the result sorted.  The
-# output from each system is then compared.  They should be identical.
-#
-# \arg $1 Name of the IXFR server
-# \arg $2 IP of the IXFR server 
-# \arg $3 Name of the IXFR client
-# \arg $4 IP of the IXFR client
-#
-# \return 0 if the zones are the same, 1 if not.
-compare_zones() {
-
-    # If the following checks fail, the code is wrong.
-
-    check_name_ip $*
-    if [ $? -ne 0 ];
-    then
-        echo "R:FAIL compare_zones - name or ip address of server not supplied"
-        return 1
-    fi
-
-    server_name=$1
-    shift
-    server_ip=$1
-    shift
-
-    check_name_ip $*
-    if [ $? -ne 0 ];
-    then
-        echo "R:FAIL compare_zones - name or ip address of client not supplied"
-        return 1
-    fi
-
-    client_name=$1
-    shift
-    client_ip=$1
-    shift
-
-    $DIG @$client_ip -p $DNS_PORT example. axfr | grep -v '^;' | grep -v '^$' \
-         | sed -e 's/ //g' -e 's/\t//g' | sort > client.dig
-    $DIG @$server_ip -p $DNS_PORT example. axfr | grep -v '^;' | grep -v '^$' \
-         | sed -e 's/ //g' -e 's/\t//g' | sort > server.dig
-    diff client.dig server.dig
-    if [ $? -eq 0 ];
-    then
-        echo "I:client and server zones identical"
-    else
-        echo "R:FAIL client $client_name zone not same as server $server_name zone"
-        return 1
-    fi
-
-    return 0
-}

+ 0 - 42
tests/system/ixfr/named_noixfr.conf

@@ -1,42 +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; };
-    provide-ixfr no;
-};
-
-zone "example" {
-	type master;
-	file "db.example";
-};

+ 0 - 40
tests/system/ixfr/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 "db.example";
-};

+ 0 - 41
tests/system/ixfr/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 "db.example";
-};

+ 0 - 125
tests/system/run.sh.in

@@ -1,125 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2004, 2007, 2010  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.
-
-#
-# Run a system test.
-#
-
-SYSTEMTOP=@abs_top_builddir@/tests/system
-. $SYSTEMTOP/conf.sh
-
-stopservers=true
-
-case $1 in
-   --keep) stopservers=false; shift ;;
-esac
-
-test $# -gt 0 || { echo "usage: $0 [--keep] test-directory" >&2; exit 1; }
-
-test=$1
-shift
-
-test -d $test || { echo "$0: $test: no such test" >&2; exit 1; }
-
-echo "S:$test:`date`" >&2
-echo "T:$test:1:A" >&2
-echo "A:System test $test" >&2
-
-if [ x$PERL = x ]
-then
-    echo "I:Perl not available.  Skipping test." >&2
-    echo "R:UNTESTED" >&2
-    echo "E:$test:`date`" >&2
-    exit 0;
-fi
-
-$PERL $TESTSOCK || {
-    echo "I:Network interface aliases not set up.  Skipping test." >&2;
-    echo "R:UNTESTED" >&2;
-    echo "E:$test:`date`" >&2;
-    exit 0;
-}
-
-
-# Check for test-specific prerequisites.
-test ! -f $test/prereq.sh || ( cd $test && sh prereq.sh "$@" )
-result=$?
-
-if [ $result -eq 0 ]; then
-    : prereqs ok
-else
-    echo "I:Prerequisites for $test missing, skipping test." >&2
-    [ $result -eq 255 ] && echo "R:SKIPPED" || echo "R:UNTESTED"
-    echo "E:$test:`date`" >&2
-    exit 0
-fi
-
-# Check for PKCS#11 support
-if
-    test ! -f $test/usepkcs11 || sh cleanpkcs11.sh
-then
-    : pkcs11 ok
-else
-    echo "I:Need PKCS#11 for $test, skipping test." >&2
-    echo "R:PKCS11ONLY" >&2
-    echo "E:$test:`date`" >&2
-    exit 0
-fi
-
-# Set up any dynamically generated test data
-if test -f $test/setup.sh
-then
-   ( cd $test && sh setup.sh "$@" )
-fi
-
-# Start name servers running
-$PERL $SYSTEMTOP/start.pl $test || exit 1
-
-# Run the tests
-( cd $test ; sh tests.sh )
-
-status=$?
-
-if $stopservers
-then
-    :
-else
-    exit $status
-fi
-
-# Shutdown
-$PERL $SYSTEMTOP/stop.pl $test
-
-status=`expr $status + $?`
-
-if [ $status != 0 ]; then
-	echo "R:FAIL"
-	# Don't clean up - we need the evidence.
-	find . -name core -exec chmod 0644 '{}' \;
-else
-	echo "R:PASS"
-
-	# Clean up.
-	if test -f $test/clean.sh
-	then
-	   ( cd $test && sh clean.sh "$@" )
-	fi
-fi
-
-echo "E:$test:`date`"
-
-exit $status

+ 0 - 44
tests/system/runall.sh

@@ -1,44 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2004, 2007, 2010  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.
-
-#
-# Run all the system tests.
-#
-
-SYSTEMTESTTOP=.
-. $SYSTEMTESTTOP/conf.sh
-
-status=0
-
-for d in $SUBDIRS
-do
-	sh run.sh $d || status=1
-done
-
-$PERL $TESTSOCK || {
-    cat <<EOF >&2
-I:
-I:NOTE: Many of the tests were skipped because they require that
-I:      the IP addresses 10.53.0.1 through 10.53.0.7 are configured
-I:	as alias addresses on the loopback interface.  Please run
-I:	"tests/system/ifconfig.sh up" as root to configure them
-I:	and rerun the tests.
-EOF
-    exit 0;
-}
-
-exit $status

+ 0 - 229
tests/system/start.pl

@@ -1,229 +0,0 @@
-#!/usr/bin/perl -w
-#
-# Copyright (C) 2004-2008, 2010  Internet Systems Consortium, Inc. ("ISC")
-# Copyright (C) 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.
-
-# Framework for starting test servers.
-# Based on the type of server specified, check for port availability, remove
-# temporary files, start the server, and verify that the server is running.
-# If a server is specified, start it. Otherwise, start all servers for test.
-
-use strict;
-use Cwd 'abs_path';
-use Getopt::Long;
-
-# Option handling
-#   --noclean test [server [options]]
-#
-#   --noclean - Do not cleanup files in server directory
-#   test - name of the test directory
-#   server - name of the server directory
-#   options - alternate options for the server
-
-my $usage = "usage: $0 [--noclean] test-directory [server-directory [server-options]]";
-my $noclean;
-GetOptions('noclean' => \$noclean);
-my $test = $ARGV[0];
-my $server = $ARGV[1];
-my $options = $ARGV[2];
-
-if (!$test) {
-	print "$usage\n";
-}
-if (!-d $test) {
-	print "No test directory: \"$test\"\n";
-}
-if ($server && !-d "$test/$server") {
-	print "No server directory: \"$test/$server\"\n";
-}
-
-# Global variables
-my $topdir = abs_path("$test/..");
-my $testdir = abs_path("$test");
-my $RUN_BIND10 = $ENV{'RUN_BIND10'};
-my $RUN_BINDCTL = $ENV{'RUN_BINDCTL'};
-my $BINDCTL_CSV_DIR = $ENV{'BINDCTL_CSV_DIR'};
-my $NAMED = $ENV{'BIND9_NAMED'};
-my $LWRESD = $ENV{'LWRESD'};
-my $DIG = $ENV{'DIG'};
-my $PERL = $ENV{'PERL'};
-my $TESTSOCK = $ENV{'TESTSOCK'};
-
-# Start the server(s)
-
-if ($server) {
-	if ($server =~ /^ns/) {
-		&check_ports($server);
-	}
-	&start_server($server, $options);
-	if ($server =~ /^ns/) {
-		&verify_server($server);
-	}
-} else {
-	# Determine which servers need to be started for this test.
-	opendir DIR, $testdir;
-	my @files = sort readdir DIR;
-	closedir DIR;
-
-	my @ns = grep /^nsx?[0-9]*$/, @files;
-	my @lwresd = grep /^lwresd[0-9]*$/, @files;
-	my @ans = grep /^ans[0-9]*$/, @files;
-
-	# Start the servers we found.
-	&check_ports();
-	foreach my $s (@ns, @lwresd, @ans) {
-		&start_server($s);
-	}
-	foreach my $s (@ns) {
-		&verify_server($s);
-	}
-}
-
-# Subroutines
-
-sub check_ports {
-	my $server = shift;
-	my $options = "";
-
-	if ($server && $server =~ /(\d+)$/) {
-		$options = "-i $1";
-	}
-
-	my $tries = 0;
-	while (1) {
-		my $return = system("$PERL $TESTSOCK -p 53210 $options");
-		last if ($return == 0);
-		if (++$tries > 4) {
-			print "$0: could not bind to server addresses, still running?\n";
-			print "I:server sockets not available\n";
-			print "R:FAIL\n";
-			system("$PERL $topdir/stop.pl $testdir"); # Is this the correct behavior?
-			exit 1;
-		}
-		print "I:Couldn't bind to socket (yet)\n";
-		sleep 2;
-	}
-}
-
-sub start_server {
-	my $server = shift;
-	my $options = shift;
-
-	my $cleanup_files;
-	my $command;
-	my $pid_file;
-
-	if ($server =~ /^nsx/) {
-		$cleanup_files = "{bind10.run}";
-		$command = "B10_FROM_SOURCE_LOCALSTATEDIR=$testdir/$server/ ";
-		$command .= "$RUN_BIND10 ";
-		if ($options) {
-			$command .= "$options";
-		} else {
-			$command .= "--msgq-socket-file=$testdir/$server/msgq_socket ";
-			$command .= "--pid-file=$testdir/$server/bind10.pid ";
-			$command .= "-v";
-		}
-		$command .= " >bind10.run 2>&1 &";
-		$pid_file = "bind10.pid";
-	} elsif ($server =~ /^ns/) {
-		$cleanup_files = "{*.jnl,*.bk,*.st,named.run}";
-		$command = "$NAMED ";
-		if ($options) {
-			$command .= "$options";
-		} else {
-			$command .= "-m record,size,mctx ";
-			$command .= "-T clienttest ";
-			$command .= "-T nosoa "
-				if (-e "$testdir/$server/named.nosoa");
-			$command .= "-T noaa "
-				if (-e "$testdir/$server/named.noaa");
-			$command .= "-c named.conf -d 99 -g";
-		}
-		$command .= " >named.run 2>&1 &";
-		$pid_file = "named.pid";
-	} elsif ($server =~ /^lwresd/) {
-		$cleanup_files = "{lwresd.run}";
-		$command = "$LWRESD ";
-		if ($options) {
-			$command .= "$options";
-		} else {
-			$command .= "-m record,size,mctx ";
-			$command .= "-T clienttest ";
-			$command .= "-C resolv.conf -d 99 -g ";
-			$command .= "-i lwresd.pid -P 9210 -p 53210";
-		}
-		$command .= " >lwresd.run 2>&1 &";
-		$pid_file = "lwresd.pid";
-	} elsif ($server =~ /^ans/) {
-		$cleanup_files = "{ans.run}";
-		$command = "$PERL ./ans.pl ";
-		if ($options) {
-			$command .= "$options";
-		} else {
-			$command .= "";
-		}
-		$command .= " >ans.run 2>&1 &";
-		$pid_file = "ans.pid";
-	} else {
-		print "I:Unknown server type $server\n";
-		print "R:FAIL\n";
-		system "$PERL $topdir/stop.pl $testdir";
-		exit 1;
-	}
-
-	print "I:starting server $server\n";
-
-	chdir "$testdir/$server";
-
-	unless ($noclean) {
-		unlink glob $cleanup_files;
-	}
-
-	system "$command";
-
-	my $tries = 0;
-	while (!-f $pid_file) {
-		if (++$tries > 14) {
-			print "I:Couldn't start server $server\n";
-			print "R:FAIL\n";
-			system "$PERL $topdir/stop.pl $testdir";
-			exit 1;
-		}
-		sleep 1;
-	}
-}
-
-sub verify_server {
-	my $server = shift;
-	my $n = $server;
-	$n =~ s/^nsx?//;
-
-	my $tries = 0;
-	while (1) {
-		my $return = system("echo \"Stats show\" | $RUN_BINDCTL --csv-file-dir=$BINDCTL_CSV_DIR > bindctl.out");
-		last if ($return == 0);
-		if (++$tries >= 30) {
-			print "I:no response from $server\n";
-			print "R:FAIL\n";
-			system("$PERL $topdir/stop.pl $testdir");
-			exit 1;
-		} else {
-			print "I:no response from $server. retrying.\n";
-		}
-		sleep 2;
-	}
-	unlink "dig.out";
-}

+ 0 - 188
tests/system/stop.pl

@@ -1,188 +0,0 @@
-#!/usr/bin/perl -w
-#
-# Copyright (C) 2004-2007  Internet Systems Consortium, Inc. ("ISC")
-# Copyright (C) 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.
-
-# Framework for stopping test servers
-# Based on the type of server specified, signal the server to stop, wait
-# briefly for it to die, and then kill it if it is still alive.
-# If a server is specified, stop it. Otherwise, stop all servers for test.
-
-use strict;
-use Cwd 'abs_path';
-
-# Option handling
-#   [--use-rndc] test [server]
-#
-#   test - name of the test directory
-#   server - name of the server directory
-
-my $usage = "usage: $0 [--use-rndc] test-directory [server-directory]";
-my $use_rndc;
-
-while (@ARGV && $ARGV[0] =~ /^-/) {
-	my $opt = shift @ARGV;
-	if ($opt eq '--use-rndc') {
-		$use_rndc = 1;
-	} else {
-		die "$usage\n";
-	}
-}
-
-my $test = $ARGV[0];
-my $server = $ARGV[1];
-
-my $errors = 0;
-
-die "$usage\n" unless defined($test);
-die "No test directory: \"$test\"\n" unless (-d $test);
-die "No server directory: \"$server\"\n" if (defined($server) && !-d "$test/$server");
-
-# Global variables
-my $testdir = abs_path($test);
-my @servers;
-
-
-# Determine which servers need to be stopped.
-if (defined $server) {
-	@servers = ($server);
-} else {
-	local *DIR;
-	opendir DIR, $testdir or die "$testdir: $!\n";
-	my @files = sort readdir DIR;
-	closedir DIR;
-
-	my @ns = grep /^nsx?[0-9]*$/, @files;
-	my @lwresd = grep /^lwresd[0-9]*$/, @files;
-	my @ans = grep /^ans[0-9]*$/, @files;
-
-	push @servers, @ns, @lwresd, @ans;
-}
-
-
-# Stop the server(s), pass 1: rndc.
-if ($use_rndc) {
-	foreach my $server (grep /^ns/, @servers) {
-		stop_rndc($server);
-	}
-
-	wait_for_servers(30, grep /^ns/, @servers);
-}
-
-
-# Pass 2: SIGTERM
-foreach my $server (@servers) {
-	stop_signal($server, "TERM");
-}
-
-wait_for_servers(60, @servers);
-
-# Pass 3: SIGABRT
-foreach my $server (@servers) {
-	stop_signal($server, "ABRT");
-}
-
-exit($errors ? 1 : 0);
-
-# Subroutines
-
-# Return the full path to a given server's PID file.
-sub server_pid_file {
-	my($server) = @_;
-
-	my $pid_file;
-	if ($server =~ /^nsx/) {
-		$pid_file = "bind10.pid";
-	} elsif ($server =~ /^ns/) {
-		$pid_file = "named.pid";
-	} elsif ($server =~ /^lwresd/) {
-		$pid_file = "lwresd.pid";
-	} elsif ($server =~ /^ans/) {
-		$pid_file = "ans.pid";
-	} else {
-		print "I:Unknown server type $server\n";
-		exit 1;
-	}
-	$pid_file = "$testdir/$server/$pid_file";
-}
-
-# Read a PID.
-sub read_pid {
-	my($pid_file) = @_;
-
-	local *FH;
-	my $result = open FH, "< $pid_file";
-	if (!$result) {
-		print "I:$pid_file: $!\n";
-		unlink $pid_file;
-		return;
-	}
-
-	my $pid = <FH>;
-	chomp($pid);
-	return $pid;
-}
-
-# Stop a named process with rndc.
-sub stop_rndc {
-	my($server) = @_;
-
-	return unless ($server =~ /^ns(\d+)$/);
-	my $ip = "10.53.0.$1";
-
-	# Ugly, but should work.
-	system("$ENV{RNDC} -c $testdir/../common/rndc.conf -s $ip -p 9953 stop | sed 's/^/I:$server /'");
-	return;
-}
-
-# Stop a server by sending a signal to it.
-sub stop_signal {
-	my($server, $sig) = @_;
-
-	my $pid_file = server_pid_file($server);
-	return unless -f $pid_file;
-
-	my $pid = read_pid($pid_file);
-	return unless defined($pid);
-
-	if ($sig eq 'ABRT') {
-		print "I:$server didn't die when sent a SIGTERM\n";
-		$errors++;
-	}
-
-	my $result = kill $sig, $pid;
-	if (!$result) {
-		print "I:$server died before a SIG$sig was sent\n";
-		unlink $pid_file;
-		$errors++;
-	}
-
-	return;
-}
-
-sub wait_for_servers {
-	my($timeout, @servers) = @_;
-
-	my @pid_files = grep { defined($_) }
-	                map  { server_pid_file($_) } @servers;
-
-	while ($timeout > 0 && @pid_files > 0) {
-		@pid_files = grep { -f $_ } @pid_files;
-		sleep 1 if (@pid_files > 0);
-		$timeout--;
-	}
-
-	return;
-}