]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
migrate tests from bin/tests/dnssec-signzone to bin/tests/system/dnssec
authorEvan Hunt <each@isc.org>
Tue, 27 Feb 2018 18:57:08 +0000 (10:57 -0800)
committerEvan Hunt <each@isc.org>
Fri, 9 Mar 2018 22:12:48 +0000 (14:12 -0800)
- added tests to the dnssec system test that duplicate the ones
  from bin/tests/dnssec-signzone
- changed cleanall.sh so it doesn't automatically remove all
  key files, because there are now some of those that are part of the
  distribution

19 files changed:
bin/tests/dnssec-signzone/run-test.sh [deleted file]
bin/tests/system/cleanall.sh
bin/tests/system/dnssec/clean.sh
bin/tests/system/dnssec/signer/general/Kexample.com.+005+07065.key [moved from bin/tests/dnssec-signzone/Kexample.com.+005+07065.key with 100% similarity]
bin/tests/system/dnssec/signer/general/Kexample.com.+005+07065.private [moved from bin/tests/dnssec-signzone/Kexample.com.+005+07065.private with 100% similarity]
bin/tests/system/dnssec/signer/general/Kexample.com.+005+23362.key [moved from bin/tests/dnssec-signzone/Kexample.com.+005+23362.key with 100% similarity]
bin/tests/system/dnssec/signer/general/Kexample.com.+005+23362.private [moved from bin/tests/dnssec-signzone/Kexample.com.+005+23362.private with 100% similarity]
bin/tests/system/dnssec/signer/general/bogus-ksk.key [moved from bin/tests/dnssec-signzone/bogus-ksk.key with 100% similarity]
bin/tests/system/dnssec/signer/general/bogus-zsk.key [moved from bin/tests/dnssec-signzone/bogus-zsk.key with 100% similarity]
bin/tests/system/dnssec/signer/general/test1.zone [moved from bin/tests/dnssec-signzone/test1.zone with 100% similarity]
bin/tests/system/dnssec/signer/general/test2.zone [moved from bin/tests/dnssec-signzone/test2.zone with 100% similarity]
bin/tests/system/dnssec/signer/general/test3.zone [moved from bin/tests/dnssec-signzone/test3.zone with 100% similarity]
bin/tests/system/dnssec/signer/general/test4.zone [moved from bin/tests/dnssec-signzone/test4.zone with 98% similarity]
bin/tests/system/dnssec/signer/general/test5.zone [moved from bin/tests/dnssec-signzone/test5.zone with 100% similarity]
bin/tests/system/dnssec/signer/general/test6.zone [moved from bin/tests/dnssec-signzone/test6.zone with 100% similarity]
bin/tests/system/dnssec/signer/general/test7.zone [moved from bin/tests/dnssec-signzone/test7.zone with 98% similarity]
bin/tests/system/dnssec/signer/general/test8.zone [moved from bin/tests/dnssec-signzone/test8.zone with 100% similarity]
bin/tests/system/dnssec/tests.sh
util/copyrights

diff --git a/bin/tests/dnssec-signzone/run-test.sh b/bin/tests/dnssec-signzone/run-test.sh
deleted file mode 100644 (file)
index 9a5d53e..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-# See the COPYRIGHT file distributed with this work for additional
-# information regarding copyright ownership.
-
-# $Id: run-test.sh,v 1.3 2009/06/04 02:56:47 tbox Exp $
-
-
-sign="../../dnssec/dnssec-signzone -f signed.zone -o example.com."
-
-signit() {
-       rm -f signed.zone
-       grep '^;' $zone
-       $sign $zone
-}
-
-expect_success() {
-       if ! test -f signed.zone ; then
-               echo "Error: expected success, but sign failed for $zone."
-       else
-               echo "Success:  Sign succeeded for $zone."
-       fi
-}
-
-expect_failure() {
-       if test -f signed.zone ; then
-               echo "Error: expected failure, but sign succeeded for $zone."
-       else
-               echo "Success:  Sign failed (expected) for $zone"
-       fi
-}
-
-zone="test1.zone" ; signit ; expect_success
-zone="test2.zone" ; signit ; expect_failure
-zone="test3.zone" ; signit ; expect_failure
-zone="test4.zone" ; signit ; expect_success
-zone="test5.zone" ; signit ; expect_failure
-zone="test6.zone" ; signit ; expect_failure
-zone="test7.zone" ; signit ; expect_failure
-zone="test8.zone" ; signit ; expect_failure
index 7e800b9017148e85a413b6eb5a5f1f44199e1c49..d57d450bf2130bcf8c88f8439d6671c88a372ecd 100644 (file)
@@ -18,7 +18,7 @@ SYSTEMTESTTOP=.
 
 
 find . -type f \( \
-    -name 'K*' -o -name '*~' -o -name 'core' -o -name '*.core' \
+    -name '*~' -o -name 'core' -o -name '*.core' \
     -o -name '*.log' -o -name '*.pid' -o -name '*.keyset' \
     -o -name named.run -o -name ans.run \
     -o -name '*-valgrind-*.log' \) -print | xargs rm -f
index 9b79004e196db6c6ab7f69480cfa4a60efffe963..29ac1695b9102b3ff12fc41e2bcf9e7d5cb774ec 100644 (file)
@@ -92,4 +92,7 @@ rm -f signer/example.db.after signer/example.db.before
 rm -f signer/example.db.changed
 rm -f signer/nsec3param.out
 rm -f signer/signer.out.*
+rm -f signer/general/signed.zone
+rm -f signer/general/signer.out.*
+rm -f signer/general/dsset*
 rm -f signing.out*
similarity index 98%
rename from bin/tests/dnssec-signzone/test4.zone
rename to bin/tests/system/dnssec/signer/general/test4.zone
index a146736a3d6cf8940bcc866d9802c784165c9528..824e52b513b683cc20addb460b847287096bd6f1 100644 (file)
@@ -1,6 +1,6 @@
 ;
 ;      This is a zone which has three DNSKEY records, two (KSK + ZSK) of
-; which have existing private key files available.  The third is a 
+; which have existing private key files available.  The third is a
 ; pre-published ZSK.
 ;
 $TTL 3600
similarity index 98%
rename from bin/tests/dnssec-signzone/test7.zone
rename to bin/tests/system/dnssec/signer/general/test7.zone
index e18e7c603e07907469aba9f404e35c8237e90587..e42d5aa1def61747787f6a06d8f41322d3a8cb50 100644 (file)
@@ -1,5 +1,5 @@
 ;
-;      This is a zone which has two DNSKEY records, none of which have 
+;      This is a zone which has two DNSKEY records, none of which have
 ; existing private key files available.  The resulting zone should fail
 ; the consistancy tests.
 ;
index 7a628c9650a0c9f1947ebd369aeb06db9a3adaf6..70b69e44c874a76759cae68127cdb2a1891cf56b 100644 (file)
@@ -1269,6 +1269,103 @@ n=`expr $n + 1`
 if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
+echo_i "basic dnssec-signzone checks:"
+echo_i " two DNSKEYs ($n)"
+ret=0
+(
+cd signer/general
+rm -f signed.zone
+$SIGNER -f signed.zone -o example.com. test1.zone > signer.out.$n 2>&1
+test -f signed.zone
+) || ret=1
+n=`expr $n + 1`
+if [ $ret != 0 ]; then echo_i "failed"; fi
+status=`expr $status + $ret`
+
+echo_i " one non-KSK DNSKEY ($n)"
+ret=0
+(
+cd signer/general
+rm -f signed.zone
+$SIGNER -f signed.zone -o example.com. test2.zone > signer.out.$n 2>&1
+test -f signed.zone
+) && ret=1
+n=`expr $n + 1`
+if [ $ret != 0 ]; then echo_i "failed"; fi
+status=`expr $status + $ret`
+
+echo_i " one KSK DNSKEY ($n)"
+ret=0
+(
+cd signer/general
+rm -f signed.zone
+$SIGNER -f signed.zone -o example.com. test3.zone > signer.out.$n 2>&1
+test -f signed.zone
+) && ret=1
+n=`expr $n + 1`
+if [ $ret != 0 ]; then echo_i "failed"; fi
+status=`expr $status + $ret`
+
+echo_i " three DNSKEY ($n)"
+ret=0
+(
+cd signer/general
+rm -f signed.zone
+$SIGNER -f signed.zone -o example.com. test4.zone > signer.out.$n 2>&1
+test -f signed.zone
+) || ret=1
+n=`expr $n + 1`
+if [ $ret != 0 ]; then echo_i "failed"; fi
+status=`expr $status + $ret`
+
+echo_i " three DNSKEY, one private key missing ($n)"
+ret=0
+(
+cd signer/general
+rm -f signed.zone
+$SIGNER -f signed.zone -o example.com. test5.zone > signer.out.$n 2>&1
+test -f signed.zone
+) || ret=1
+n=`expr $n + 1`
+if [ $ret != 0 ]; then echo_i "failed"; fi
+status=`expr $status + $ret`
+
+echo_i " four DNSKEY ($n)"
+ret=0
+(
+cd signer/general
+rm -f signed.zone
+$SIGNER -f signed.zone -o example.com. test6.zone > signer.out.$n 2>&1
+test -f signed.zone
+) || ret=1
+n=`expr $n + 1`
+if [ $ret != 0 ]; then echo_i "failed"; fi
+status=`expr $status + $ret`
+
+echo_i " two DNSKEY, both private keys missing ($n)"
+ret=0
+(
+cd signer/general
+rm -f signed.zone
+$SIGNER -f signed.zone -o example.com. test7.zone > signer.out.$n 2>&1
+test -f signed.zone
+) && ret=1
+n=`expr $n + 1`
+if [ $ret != 0 ]; then echo_i "failed"; fi
+status=`expr $status + $ret`
+
+echo_i " two DNSKEY, one private key missing ($n)"
+ret=0
+(
+cd signer/general
+rm -f signed.zone
+$SIGNER -f signed.zone -o example.com. test8.zone > signer.out.$n 2>&1
+test -f signed.zone
+) && ret=1
+n=`expr $n + 1`
+if [ $ret != 0 ]; then echo_i "failed"; fi
+status=`expr $status + $ret`
+
 echo_i "checking that we can sign a zone with out-of-zone records ($n)"
 ret=0
 zone=example
index 9e3e327dcaa7ac97a8ba0881504a749b1f657fd3..687b144b68509a13c459e49e35703ab2ea4e0c89 100644 (file)
 ./bin/tests/db/win32/t_db.vcxproj.in           X       2013,2015,2016,2017,2018
 ./bin/tests/db/win32/t_db.vcxproj.user         X       2013,2018
 ./bin/tests/db_test.c                          C       1999,2000,2001,2004,2005,2007,2008,2009,2011,2012,2013,2015,2016,2017,2018
-./bin/tests/dnssec-signzone/Kexample.com.+005+07065.key        X       2009,2018
-./bin/tests/dnssec-signzone/Kexample.com.+005+07065.private    X       2009,2018
-./bin/tests/dnssec-signzone/Kexample.com.+005+23362.key        X       2009,2018
-./bin/tests/dnssec-signzone/Kexample.com.+005+23362.private    X       2009,2018
-./bin/tests/dnssec-signzone/bogus-ksk.key      X       2009,2018
-./bin/tests/dnssec-signzone/bogus-zsk.key      X       2009,2018
-./bin/tests/dnssec-signzone/run-test.sh                SH      2009,2012,2016,2018
-./bin/tests/dnssec-signzone/test1.zone         X       2009,2018
-./bin/tests/dnssec-signzone/test2.zone         X       2009,2018
-./bin/tests/dnssec-signzone/test3.zone         X       2009,2018
-./bin/tests/dnssec-signzone/test4.zone         X       2009,2018
-./bin/tests/dnssec-signzone/test5.zone         X       2009,2018
-./bin/tests/dnssec-signzone/test6.zone         X       2009,2018
-./bin/tests/dnssec-signzone/test7.zone         X       2009,2018
-./bin/tests/dnssec-signzone/test8.zone         X       2009,2018
 ./bin/tests/dst/.gitignore                     X       2012,2013,2018
 ./bin/tests/dst/Kdh.+002+18602.key.in          X       2001,2013,2018
 ./bin/tests/dst/Kdh.+002+18602.private.in      X       2001,2013,2018