]> 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 23:30:27 +0000 (15:30 -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

(cherry picked from commit ccfe778c0165dc26ab5ac5291e5ab53f9d0a3298)
(cherry picked from commit d8f8eee381497d97d0bd0c013aafef2cfd674b2d)

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 fefad28..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2009, 2012, 2016  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/.
-
-# $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 a259503a0388ff591d0f8f40750979a133be6ef6..38bf68fddef72637b0083cca8174db6709107e4b 100644 (file)
@@ -15,7 +15,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 lwresd.run -o -name ans.run \
     -o -name '*-valgrind-*.log' \) -print | xargs rm -f
index e0082bbcf869f93f6a442a60bbc66ef3e90e158c..bb88011800abc861b454c0369f1be1a542c83b6f 100644 (file)
@@ -84,6 +84,9 @@ 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*
 rm -f signer/*.signed.pre*
 rm -f signer/*.signed.post*
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 31734edb38ec64c031298c1ffcd20d5aaa8f76a3..16f6361c127beb6741dbe09ee0ff1345469fd46a 100644 (file)
@@ -1270,6 +1270,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 b162f86d19016ae03082d942c562842f42ee9672..b5680fe1fccb4ae407ac2d1fd844bca4693cd6c8 100644 (file)
 ./bin/tests/db/win32/t_db.vcxproj.in           X       2013,2015,2016,2017
 ./bin/tests/db/win32/t_db.vcxproj.user         X       2013
 ./bin/tests/db_test.c                          C       1999,2000,2001,2004,2005,2007,2008,2009,2011,2012,2013,2015,2016,2017
-./bin/tests/dnssec-signzone/Kexample.com.+005+07065.key        X       2009
-./bin/tests/dnssec-signzone/Kexample.com.+005+07065.private    X       2009
-./bin/tests/dnssec-signzone/Kexample.com.+005+23362.key        X       2009
-./bin/tests/dnssec-signzone/Kexample.com.+005+23362.private    X       2009
-./bin/tests/dnssec-signzone/bogus-ksk.key      X       2009
-./bin/tests/dnssec-signzone/bogus-zsk.key      X       2009
-./bin/tests/dnssec-signzone/run-test.sh                SH      2009,2012,2016
-./bin/tests/dnssec-signzone/test1.zone         X       2009
-./bin/tests/dnssec-signzone/test2.zone         X       2009
-./bin/tests/dnssec-signzone/test3.zone         X       2009
-./bin/tests/dnssec-signzone/test4.zone         X       2009
-./bin/tests/dnssec-signzone/test5.zone         X       2009
-./bin/tests/dnssec-signzone/test6.zone         X       2009
-./bin/tests/dnssec-signzone/test7.zone         X       2009
-./bin/tests/dnssec-signzone/test8.zone         X       2009
 ./bin/tests/dst/.gitignore                     X       2012,2013
 ./bin/tests/dst/Kdh.+002+18602.key.in          X       2001,2013
 ./bin/tests/dst/Kdh.+002+18602.private.in      X       2001,2013