Commit c64ed484 authored by Matthijs Mekking's avatar Matthijs Mekking 🏡

Only perform test cleanups in clean.sh scripts

Temporary files created by a given system test should be removed by its
clean.sh script, not its setup.sh script.  Remove redundant "rm"
invocations from setup.sh scripts.  Move required "rm" invocations from
setup.sh scripts to their corresponding clean.sh scripts.
parent 7f6cc1b4
...@@ -23,7 +23,4 @@ copy_setports ns2/named1.conf.in ns2/named.conf ...@@ -23,7 +23,4 @@ copy_setports ns2/named1.conf.in ns2/named.conf
copy_setports ns3/named1.conf.in ns3/named.conf copy_setports ns3/named1.conf.in ns3/named.conf
cp -f ns2/default.nzf.in ns2/3bf305731dd26307.nzf cp -f ns2/default.nzf.in ns2/3bf305731dd26307.nzf
rm -f ns3/*.nzf ns3/*.nzf~
rm -f ns3/*.nzd ns3/*.nzd-lock
rm -f ns3/inlineslave.db
mkdir ns2/new-zones mkdir ns2/new-zones
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
SYSTEMTESTTOP=.. SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh . $SYSTEMTESTTOP/conf.sh
rm -f named-compilezone
ln -s $CHECKZONE named-compilezone ln -s $CHECKZONE named-compilezone
./named-compilezone -D -F raw -o good1.db.raw example \ ./named-compilezone -D -F raw -o good1.db.raw example \
......
...@@ -18,8 +18,6 @@ ln -s $CHECKZONE named-compilezone ...@@ -18,8 +18,6 @@ ln -s $CHECKZONE named-compilezone
# Test 1: KSK goes inactive before successor is active # Test 1: KSK goes inactive before successor is active
dir=01-ksk-inactive dir=01-ksk-inactive
rm -f $dir/K*.key
rm -f $dir/K*.private
ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com` ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com`
$SETTIME -K $dir -I +9mo -D +1y $ksk1 > /dev/null 2>&1 $SETTIME -K $dir -I +9mo -D +1y $ksk1 > /dev/null 2>&1
ksk2=`$KEYGEN -q -K $dir -S $ksk1` ksk2=`$KEYGEN -q -K $dir -S $ksk1`
...@@ -28,8 +26,6 @@ zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com` ...@@ -28,8 +26,6 @@ zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com`
# Test 2: ZSK goes inactive before successor is active # Test 2: ZSK goes inactive before successor is active
dir=02-zsk-inactive dir=02-zsk-inactive
rm -f $dir/K*.key
rm -f $dir/K*.private
zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com` zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com`
$SETTIME -K $dir -I +9mo -D +1y $zsk1 > /dev/null 2>&1 $SETTIME -K $dir -I +9mo -D +1y $zsk1 > /dev/null 2>&1
zsk2=`$KEYGEN -q -K $dir -S $zsk1` zsk2=`$KEYGEN -q -K $dir -S $zsk1`
...@@ -38,8 +34,6 @@ ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com` ...@@ -38,8 +34,6 @@ ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com`
# Test 3: KSK is unpublished before its successor is published # Test 3: KSK is unpublished before its successor is published
dir=03-ksk-unpublished dir=03-ksk-unpublished
rm -f $dir/K*.key
rm -f $dir/K*.private
ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com` ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com`
$SETTIME -K $dir -I +9mo -D +1y $ksk1 > /dev/null 2>&1 $SETTIME -K $dir -I +9mo -D +1y $ksk1 > /dev/null 2>&1
ksk2=`$KEYGEN -q -K $dir -S $ksk1` ksk2=`$KEYGEN -q -K $dir -S $ksk1`
...@@ -48,8 +42,6 @@ zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com` ...@@ -48,8 +42,6 @@ zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com`
# Test 4: ZSK is unpublished before its successor is published # Test 4: ZSK is unpublished before its successor is published
dir=04-zsk-unpublished dir=04-zsk-unpublished
rm -f $dir/K*.key
rm -f $dir/K*.private
zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com` zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com`
$SETTIME -K $dir -I +9mo -D +1y $zsk1 > /dev/null 2>&1 $SETTIME -K $dir -I +9mo -D +1y $zsk1 > /dev/null 2>&1
zsk2=`$KEYGEN -q -K $dir -S $zsk1` zsk2=`$KEYGEN -q -K $dir -S $zsk1`
...@@ -59,8 +51,6 @@ ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com` ...@@ -59,8 +51,6 @@ ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com`
# Test 5: KSK deleted and successor published before KSK is deactivated # Test 5: KSK deleted and successor published before KSK is deactivated
# and successor activated. # and successor activated.
dir=05-ksk-unpub-active dir=05-ksk-unpub-active
rm -f $dir/K*.key
rm -f $dir/K*.private
ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com` ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com`
$SETTIME -K $dir -I +9mo -D +8mo $ksk1 > /dev/null 2>&1 $SETTIME -K $dir -I +9mo -D +8mo $ksk1 > /dev/null 2>&1
ksk2=`$KEYGEN -q -K $dir -S $ksk1` ksk2=`$KEYGEN -q -K $dir -S $ksk1`
...@@ -69,8 +59,6 @@ zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com` ...@@ -69,8 +59,6 @@ zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com`
# Test 6: ZSK deleted and successor published before ZSK is deactivated # Test 6: ZSK deleted and successor published before ZSK is deactivated
# and successor activated. # and successor activated.
dir=06-zsk-unpub-active dir=06-zsk-unpub-active
rm -f $dir/K*.key
rm -f $dir/K*.private
zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com` zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com`
$SETTIME -K $dir -I +9mo -D +8mo $zsk1 > /dev/null 2>&1 $SETTIME -K $dir -I +9mo -D +8mo $zsk1 > /dev/null 2>&1
zsk2=`$KEYGEN -q -K $dir -S $zsk1` zsk2=`$KEYGEN -q -K $dir -S $zsk1`
...@@ -78,8 +66,6 @@ ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com` ...@@ -78,8 +66,6 @@ ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com`
# Test 7: KSK rolled with insufficient delay after prepublication. # Test 7: KSK rolled with insufficient delay after prepublication.
dir=07-ksk-ttl dir=07-ksk-ttl
rm -f $dir/K*.key
rm -f $dir/K*.private
ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com` ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com`
$SETTIME -K $dir -I +9mo -D +1y $ksk1 > /dev/null 2>&1 $SETTIME -K $dir -I +9mo -D +1y $ksk1 > /dev/null 2>&1
ksk2=`$KEYGEN -q -K $dir -S $ksk1` ksk2=`$KEYGEN -q -K $dir -S $ksk1`
...@@ -89,8 +75,6 @@ zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com` ...@@ -89,8 +75,6 @@ zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com`
# Test 8: ZSK rolled with insufficient delay after prepublication. # Test 8: ZSK rolled with insufficient delay after prepublication.
dir=08-zsk-ttl dir=08-zsk-ttl
rm -f $dir/K*.key
rm -f $dir/K*.private
zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com` zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com`
$SETTIME -K $dir -I +9mo -D +1y $zsk1 > /dev/null 2>&1 $SETTIME -K $dir -I +9mo -D +1y $zsk1 > /dev/null 2>&1
zsk2=`$KEYGEN -q -K $dir -S $zsk1` zsk2=`$KEYGEN -q -K $dir -S $zsk1`
...@@ -100,8 +84,6 @@ ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com` ...@@ -100,8 +84,6 @@ ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com`
# Test 9: KSK goes inactive before successor is active, but checking ZSKs # Test 9: KSK goes inactive before successor is active, but checking ZSKs
dir=09-check-zsk dir=09-check-zsk
rm -f $dir/K*.key
rm -f $dir/K*.private
ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com` ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com`
$SETTIME -K $dir -I +9mo -D +1y $ksk1 > /dev/null 2>&1 $SETTIME -K $dir -I +9mo -D +1y $ksk1 > /dev/null 2>&1
ksk2=`$KEYGEN -q -K $dir -S $ksk1` ksk2=`$KEYGEN -q -K $dir -S $ksk1`
...@@ -110,8 +92,6 @@ zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com` ...@@ -110,8 +92,6 @@ zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com`
# Test 10: ZSK goes inactive before successor is active, but checking KSKs # Test 10: ZSK goes inactive before successor is active, but checking KSKs
dir=10-check-ksk dir=10-check-ksk
rm -f $dir/K*.key
rm -f $dir/K*.private
zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com` zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com`
$SETTIME -K $dir -I +9mo -D +1y $zsk1 > /dev/null 2>&1 $SETTIME -K $dir -I +9mo -D +1y $zsk1 > /dev/null 2>&1
zsk2=`$KEYGEN -q -K $dir -S $zsk1` zsk2=`$KEYGEN -q -K $dir -S $zsk1`
...@@ -120,8 +100,6 @@ ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com` ...@@ -120,8 +100,6 @@ ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com`
# Test 11: ZSK goes inactive before successor is active, but after cutoff # Test 11: ZSK goes inactive before successor is active, but after cutoff
dir=11-cutoff dir=11-cutoff
rm -f $dir/K*.key
rm -f $dir/K*.private
zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com` zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com`
$SETTIME -K $dir -I +18mo -D +2y $zsk1 > /dev/null 2>&1 $SETTIME -K $dir -I +18mo -D +2y $zsk1 > /dev/null 2>&1
zsk2=`$KEYGEN -q -K $dir -S $zsk1` zsk2=`$KEYGEN -q -K $dir -S $zsk1`
......
#!/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.
rm -f ns2/example.bk
rm -f ns3/example.bk
rm -f */named.memstats */named.run
...@@ -7,5 +7,7 @@ ...@@ -7,5 +7,7 @@
# See the COPYRIGHT file distributed with this work for additional # See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership. # information regarding copyright ownership.
rm -f ns2/example.bk # shellcheck source=conf.sh
rm -f ns3/example.bk . "$SYSTEMTESTTOP/conf.sh"
$SHELL clean.sh
...@@ -13,7 +13,6 @@ SYSTEMTESTTOP=.. ...@@ -13,7 +13,6 @@ SYSTEMTESTTOP=..
$SHELL clean.sh $SHELL clean.sh
cp ns1/root.db.in ns1/root.db cp ns1/root.db.in ns1/root.db
rm -f ns1/root.db.signed
touch ns2/trusted.conf touch ns2/trusted.conf
cp ns2/nsec3-loop.db.in ns2/nsec3-loop.db cp ns2/nsec3-loop.db.in ns2/nsec3-loop.db
...@@ -24,7 +23,6 @@ cp ns2/bits.db.in ns2/nokeys.db ...@@ -24,7 +23,6 @@ cp ns2/bits.db.in ns2/nokeys.db
cp ns2/bits.db.in ns2/removedkeys-secondary.db cp ns2/bits.db.in ns2/removedkeys-secondary.db
cp ns2/bits.db.in ns2/retransfer.db cp ns2/bits.db.in ns2/retransfer.db
cp ns2/bits.db.in ns2/retransfer3.db cp ns2/bits.db.in ns2/retransfer3.db
rm -f ns2/bits.db.jnl
cp ns3/master.db.in ns3/master.db cp ns3/master.db.in ns3/master.db
cp ns3/master.db.in ns3/dynamic.db cp ns3/master.db.in ns3/dynamic.db
...@@ -39,7 +37,6 @@ mkdir ns3/removedkeys ...@@ -39,7 +37,6 @@ mkdir ns3/removedkeys
touch ns4/trusted.conf touch ns4/trusted.conf
cp ns4/noixfr.db.in ns4/noixfr.db cp ns4/noixfr.db.in ns4/noixfr.db
rm -f ns4/noixfr.db.jnl
copy_setports ns1/named.conf.in ns1/named.conf copy_setports ns1/named.conf.in ns1/named.conf
copy_setports ns2/named.conf.in ns2/named.conf copy_setports ns2/named.conf.in ns2/named.conf
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
# information regarding copyright ownership. # information regarding copyright ownership.
rm -f stats.* rm -f stats.*
rm -f ns1/myftp.db rm -f ns1/*.db ns1/*.jnl
rm -f ns3/*.jnl ns3/mytest.db ns3/subtest.db rm -f ns3/*.jnl ns3/mytest.db ns3/subtest.db
rm -f ns4/*.jnl ns4/*.db rm -f ns4/*.jnl ns4/*.db
rm -f */named.memstats rm -f */named.memstats
......
...@@ -14,8 +14,6 @@ SYSTEMTESTTOP=.. ...@@ -14,8 +14,6 @@ SYSTEMTESTTOP=..
$SHELL clean.sh $SHELL clean.sh
rm -f ns1/*.db ns1/*.jnl ns3/*.jnl ns4/*.db ns4/*.jnl
cat <<EOF >ns1/named.conf cat <<EOF >ns1/named.conf
options { options {
query-source address 10.53.0.1; query-source address 10.53.0.1;
......
...@@ -19,8 +19,6 @@ $SHELL clean.sh ...@@ -19,8 +19,6 @@ $SHELL clean.sh
# Test 1: KSK goes inactive before successor is active # Test 1: KSK goes inactive before successor is active
dir=01-ksk-inactive dir=01-ksk-inactive
echo_i "set up $dir" echo_i "set up $dir"
rm -f $dir/K*.key
rm -f $dir/K*.private
ksk1=`$KEYGEN -K $dir -a rsasha1 -3fk example.com` ksk1=`$KEYGEN -K $dir -a rsasha1 -3fk example.com`
$SETTIME -K $dir -I +9mo -D +1y $ksk1 > /dev/null 2>&1 $SETTIME -K $dir -I +9mo -D +1y $ksk1 > /dev/null 2>&1
ksk2=`$KEYGEN -K $dir -S $ksk1` ksk2=`$KEYGEN -K $dir -S $ksk1`
...@@ -30,8 +28,6 @@ zsk1=`$KEYGEN -K $dir -a rsasha1 -3 example.com` ...@@ -30,8 +28,6 @@ zsk1=`$KEYGEN -K $dir -a rsasha1 -3 example.com`
# Test 2: ZSK goes inactive before successor is active # Test 2: ZSK goes inactive before successor is active
dir=02-zsk-inactive dir=02-zsk-inactive
echo_i "set up $dir" echo_i "set up $dir"
rm -f $dir/K*.key
rm -f $dir/K*.private
zsk1=`$KEYGEN -K $dir -a rsasha1 -3 example.com` zsk1=`$KEYGEN -K $dir -a rsasha1 -3 example.com`
$SETTIME -K $dir -I +9mo -D +1y $zsk1 > /dev/null 2>&1 $SETTIME -K $dir -I +9mo -D +1y $zsk1 > /dev/null 2>&1
zsk2=`$KEYGEN -K $dir -S $zsk1` zsk2=`$KEYGEN -K $dir -S $zsk1`
...@@ -41,8 +37,6 @@ ksk1=`$KEYGEN -K $dir -a rsasha1 -3fk example.com` ...@@ -41,8 +37,6 @@ ksk1=`$KEYGEN -K $dir -a rsasha1 -3fk example.com`
# Test 3: KSK is unpublished before its successor is published # Test 3: KSK is unpublished before its successor is published
dir=03-ksk-unpublished dir=03-ksk-unpublished
echo_i "set up $dir" echo_i "set up $dir"
rm -f $dir/K*.key
rm -f $dir/K*.private
ksk1=`$KEYGEN -K $dir -a rsasha1 -3fk example.com` ksk1=`$KEYGEN -K $dir -a rsasha1 -3fk example.com`
$SETTIME -K $dir -I +9mo -D +1y $ksk1 > /dev/null 2>&1 $SETTIME -K $dir -I +9mo -D +1y $ksk1 > /dev/null 2>&1
ksk2=`$KEYGEN -K $dir -S $ksk1` ksk2=`$KEYGEN -K $dir -S $ksk1`
...@@ -52,8 +46,6 @@ zsk1=`$KEYGEN -K $dir -a rsasha1 -3 example.com` ...@@ -52,8 +46,6 @@ zsk1=`$KEYGEN -K $dir -a rsasha1 -3 example.com`
# Test 4: ZSK is unpublished before its successor is published # Test 4: ZSK is unpublished before its successor is published
dir=04-zsk-unpublished dir=04-zsk-unpublished
echo_i "set up $dir" echo_i "set up $dir"
rm -f $dir/K*.key
rm -f $dir/K*.private
zsk1=`$KEYGEN -K $dir -a rsasha1 -3 example.com` zsk1=`$KEYGEN -K $dir -a rsasha1 -3 example.com`
$SETTIME -K $dir -I +9mo -D +1y $zsk1 > /dev/null 2>&1 $SETTIME -K $dir -I +9mo -D +1y $zsk1 > /dev/null 2>&1
zsk2=`$KEYGEN -K $dir -S $zsk1` zsk2=`$KEYGEN -K $dir -S $zsk1`
...@@ -64,8 +56,6 @@ ksk1=`$KEYGEN -K $dir -a rsasha1 -3fk example.com` ...@@ -64,8 +56,6 @@ ksk1=`$KEYGEN -K $dir -a rsasha1 -3fk example.com`
# and successor activated. # and successor activated.
dir=05-ksk-unpub-active dir=05-ksk-unpub-active
echo_i "set up $dir" echo_i "set up $dir"
rm -f $dir/K*.key
rm -f $dir/K*.private
ksk1=`$KEYGEN -K $dir -a rsasha1 -3fk example.com` ksk1=`$KEYGEN -K $dir -a rsasha1 -3fk example.com`
$SETTIME -K $dir -I +9mo -D +8mo $ksk1 > /dev/null 2>&1 $SETTIME -K $dir -I +9mo -D +8mo $ksk1 > /dev/null 2>&1
ksk2=`$KEYGEN -K $dir -S $ksk1` ksk2=`$KEYGEN -K $dir -S $ksk1`
...@@ -75,8 +65,6 @@ zsk1=`$KEYGEN -K $dir -a rsasha1 -3 example.com` ...@@ -75,8 +65,6 @@ zsk1=`$KEYGEN -K $dir -a rsasha1 -3 example.com`
# and successor activated. # and successor activated.
dir=06-zsk-unpub-active dir=06-zsk-unpub-active
echo_i "set up $dir" echo_i "set up $dir"
rm -f $dir/K*.key
rm -f $dir/K*.private
zsk1=`$KEYGEN -K $dir -a rsasha1 -3 example.com` zsk1=`$KEYGEN -K $dir -a rsasha1 -3 example.com`
$SETTIME -K $dir -I +9mo -D +8mo $zsk1 > /dev/null 2>&1 $SETTIME -K $dir -I +9mo -D +8mo $zsk1 > /dev/null 2>&1
zsk2=`$KEYGEN -K $dir -S $zsk1` zsk2=`$KEYGEN -K $dir -S $zsk1`
...@@ -85,8 +73,6 @@ ksk1=`$KEYGEN -K $dir -a rsasha1 -3fk example.com` ...@@ -85,8 +73,6 @@ ksk1=`$KEYGEN -K $dir -a rsasha1 -3fk example.com`
# Test 7: KSK rolled with insufficient delay after prepublication. # Test 7: KSK rolled with insufficient delay after prepublication.
dir=07-ksk-ttl dir=07-ksk-ttl
echo_i "set up $dir" echo_i "set up $dir"
rm -f $dir/K*.key
rm -f $dir/K*.private
ksk1=`$KEYGEN -K $dir -a rsasha1 -3fk example.com` ksk1=`$KEYGEN -K $dir -a rsasha1 -3fk example.com`
$SETTIME -K $dir -I +9mo -D +1y $ksk1 > /dev/null 2>&1 $SETTIME -K $dir -I +9mo -D +1y $ksk1 > /dev/null 2>&1
ksk2=`$KEYGEN -K $dir -S $ksk1` ksk2=`$KEYGEN -K $dir -S $ksk1`
...@@ -96,8 +82,6 @@ zsk1=`$KEYGEN -K $dir -a rsasha1 -3 example.com` ...@@ -96,8 +82,6 @@ zsk1=`$KEYGEN -K $dir -a rsasha1 -3 example.com`
# Test 8: ZSK rolled with insufficient delay after prepublication. # Test 8: ZSK rolled with insufficient delay after prepublication.
dir=08-zsk-ttl dir=08-zsk-ttl
echo_i "set up $dir" echo_i "set up $dir"
rm -f $dir/K*.key
rm -f $dir/K*.private
zsk1=`$KEYGEN -K $dir -a rsasha1 -3 example.com` zsk1=`$KEYGEN -K $dir -a rsasha1 -3 example.com`
$SETTIME -K $dir -I +9mo -D +1y $zsk1 > /dev/null 2>&1 $SETTIME -K $dir -I +9mo -D +1y $zsk1 > /dev/null 2>&1
zsk2=`$KEYGEN -K $dir -S $zsk1` zsk2=`$KEYGEN -K $dir -S $zsk1`
...@@ -106,14 +90,10 @@ $SETTIME -K $dir -P +269d $zsk2 > /dev/null 2>&1 ...@@ -106,14 +90,10 @@ $SETTIME -K $dir -P +269d $zsk2 > /dev/null 2>&1
ksk1=`$KEYGEN -K $dir -a rsasha1 -3fk example.com` ksk1=`$KEYGEN -K $dir -a rsasha1 -3fk example.com`
# Test 9: No special preparation needed # Test 9: No special preparation needed
rm -f $dir/K*.key
rm -f $dir/K*.private
# Test 10: Valid key set, but rollover period has changed # Test 10: Valid key set, but rollover period has changed
dir=10-change-roll dir=10-change-roll
echo_i "set up $dir" echo_i "set up $dir"
rm -f $dir/K*.key
rm -f $dir/K*.private
ksk1=`$KEYGEN -K $dir -a rsasha1 -3fk example.com` ksk1=`$KEYGEN -K $dir -a rsasha1 -3fk example.com`
zsk1=`$KEYGEN -K $dir -a rsasha1 -3 example.com` zsk1=`$KEYGEN -K $dir -a rsasha1 -3 example.com`
$SETTIME -K $dir -I +3mo -D +4mo $zsk1 > /dev/null 2>&1 $SETTIME -K $dir -I +3mo -D +4mo $zsk1 > /dev/null 2>&1
...@@ -122,8 +102,6 @@ zsk2=`$KEYGEN -K $dir -S $zsk1` ...@@ -122,8 +102,6 @@ zsk2=`$KEYGEN -K $dir -S $zsk1`
# Test 11: Many keys all simultaneously scheduled to be active in the future # Test 11: Many keys all simultaneously scheduled to be active in the future
dir=11-many-simul dir=11-many-simul
echo_i "set up $dir" echo_i "set up $dir"
rm -f $dir/K*.key
rm -f $dir/K*.private
k1=`$KEYGEN -K $dir -a rsasha1 -q3fk -P now+1mo -A now+1mo example.com` k1=`$KEYGEN -K $dir -a rsasha1 -q3fk -P now+1mo -A now+1mo example.com`
z1=`$KEYGEN -K $dir -a rsasha1 -q3 -P now+1mo -A now+1mo example.com` z1=`$KEYGEN -K $dir -a rsasha1 -q3 -P now+1mo -A now+1mo example.com`
z2=`$KEYGEN -K $dir -a rsasha1 -q3 -P now+1mo -A now+1mo example.com` z2=`$KEYGEN -K $dir -a rsasha1 -q3 -P now+1mo -A now+1mo example.com`
...@@ -133,8 +111,6 @@ z4=`$KEYGEN -K $dir -a rsasha1 -q3 -P now+1mo -A now+1mo example.com` ...@@ -133,8 +111,6 @@ z4=`$KEYGEN -K $dir -a rsasha1 -q3 -P now+1mo -A now+1mo example.com`
# Test 12: Many keys all simultaneously scheduled to be active in the past # Test 12: Many keys all simultaneously scheduled to be active in the past
dir=12-many-active dir=12-many-active
echo_i "set up $dir" echo_i "set up $dir"
rm -f $dir/K*.key
rm -f $dir/K*.private
k1=`$KEYGEN -K $dir -a rsasha1 -q3fk example.com` k1=`$KEYGEN -K $dir -a rsasha1 -q3fk example.com`
z1=`$KEYGEN -K $dir -a rsasha1 -q3 example.com` z1=`$KEYGEN -K $dir -a rsasha1 -q3 example.com`
z2=`$KEYGEN -K $dir -a rsasha1 -q3 example.com` z2=`$KEYGEN -K $dir -a rsasha1 -q3 example.com`
...@@ -144,8 +120,6 @@ z4=`$KEYGEN -K $dir -a rsasha1 -q3 example.com` ...@@ -144,8 +120,6 @@ z4=`$KEYGEN -K $dir -a rsasha1 -q3 example.com`
# Test 13: Multiple simultaneous keys with no configured roll period # Test 13: Multiple simultaneous keys with no configured roll period
dir=13-noroll dir=13-noroll
echo_i "set up $dir" echo_i "set up $dir"
rm -f $dir/K*.key
rm -f $dir/K*.private
k1=`$KEYGEN -K $dir -a rsasha1 -q3fk example.com` k1=`$KEYGEN -K $dir -a rsasha1 -q3fk example.com`
k2=`$KEYGEN -K $dir -a rsasha1 -q3fk example.com` k2=`$KEYGEN -K $dir -a rsasha1 -q3fk example.com`
k3=`$KEYGEN -K $dir -a rsasha1 -q3fk example.com` k3=`$KEYGEN -K $dir -a rsasha1 -q3fk example.com`
...@@ -154,8 +128,6 @@ z1=`$KEYGEN -K $dir -a rsasha1 -q3 example.com` ...@@ -154,8 +128,6 @@ z1=`$KEYGEN -K $dir -a rsasha1 -q3 example.com`
# Test 14: Keys exist but have the wrong algorithm # Test 14: Keys exist but have the wrong algorithm
dir=14-wrongalg dir=14-wrongalg
echo_i "set up $dir" echo_i "set up $dir"
rm -f $dir/K*.key
rm -f $dir/K*.private
k1=`$KEYGEN -K $dir -a rsasha1 -qfk example.com` k1=`$KEYGEN -K $dir -a rsasha1 -qfk example.com`
z1=`$KEYGEN -K $dir -a rsasha1 -q example.com` z1=`$KEYGEN -K $dir -a rsasha1 -q example.com`
$SETTIME -K $dir -I now+6mo -D now+8mo $z1 > /dev/null $SETTIME -K $dir -I now+6mo -D now+8mo $z1 > /dev/null
...@@ -168,8 +140,6 @@ z4=`$KEYGEN -K $dir -q -S ${z3}.key` ...@@ -168,8 +140,6 @@ z4=`$KEYGEN -K $dir -q -S ${z3}.key`
# Test 15: No zones specified; just search the directory for keys # Test 15: No zones specified; just search the directory for keys
dir=15-unspec dir=15-unspec
echo_i "set up $dir" echo_i "set up $dir"
rm -f $dir/K*.key
rm -f $dir/K*.private
k1=`$KEYGEN -K $dir -a rsasha1 -q3fk example.com` k1=`$KEYGEN -K $dir -a rsasha1 -q3fk example.com`
z1=`$KEYGEN -K $dir -a rsasha1 -q3 example.com` z1=`$KEYGEN -K $dir -a rsasha1 -q3 example.com`
$SETTIME -K $dir -I now+6mo -D now+8mo $z1 > /dev/null $SETTIME -K $dir -I now+6mo -D now+8mo $z1 > /dev/null
...@@ -183,8 +153,6 @@ z4=`$KEYGEN -K $dir -q -S ${z3}.key` ...@@ -183,8 +153,6 @@ z4=`$KEYGEN -K $dir -q -S ${z3}.key`
# keys have the wrong algorithm for their policies # keys have the wrong algorithm for their policies
dir=16-wrongalg-unspec dir=16-wrongalg-unspec
echo_i "set up $dir" echo_i "set up $dir"
rm -f $dir/K*.key
rm -f $dir/K*.private
k1=`$KEYGEN -K $dir -a rsasha1 -qfk example.com` k1=`$KEYGEN -K $dir -a rsasha1 -qfk example.com`
z1=`$KEYGEN -K $dir -a rsasha1 -q example.com` z1=`$KEYGEN -K $dir -a rsasha1 -q example.com`
$SETTIME -K $dir -I now+6mo -D now+8mo $z1 > /dev/null $SETTIME -K $dir -I now+6mo -D now+8mo $z1 > /dev/null
...@@ -198,8 +166,6 @@ z4=`$KEYGEN -K $dir -q -S ${z3}.key` ...@@ -198,8 +166,6 @@ z4=`$KEYGEN -K $dir -q -S ${z3}.key`
# flag (this should fail) # flag (this should fail)
dir=17-noforce dir=17-noforce
echo_i "set up $dir" echo_i "set up $dir"
rm -f $dir/K*.key
rm -f $dir/K*.private
k1=`$KEYGEN -K $dir -a rsasha1 -q3fk example.com` k1=`$KEYGEN -K $dir -a rsasha1 -q3fk example.com`
z1=`$KEYGEN -K $dir -a rsasha1 -q3 example.com` z1=`$KEYGEN -K $dir -a rsasha1 -q3 example.com`
z2=`$KEYGEN -K $dir -a rsasha1 -q3 example.com` z2=`$KEYGEN -K $dir -a rsasha1 -q3 example.com`
...@@ -209,8 +175,6 @@ z4=`$KEYGEN -K $dir -a rsasha1 -q3 example.com` ...@@ -209,8 +175,6 @@ z4=`$KEYGEN -K $dir -a rsasha1 -q3 example.com`
# Test 18: Prepublication interval is set to a nonstandard value # Test 18: Prepublication interval is set to a nonstandard value
dir=18-nonstd-prepub dir=18-nonstd-prepub
echo_i "set up $dir" echo_i "set up $dir"
rm -f $dir/K*.key
rm -f $dir/K*.private
ksk1=`$KEYGEN -K $dir -a rsasha1 -3fk example.com` ksk1=`$KEYGEN -K $dir -a rsasha1 -3fk example.com`
zsk1=`$KEYGEN -K $dir -a rsasha1 -3 example.com` zsk1=`$KEYGEN -K $dir -a rsasha1 -3 example.com`
$SETTIME -K $dir -I now+2mo -D now+3mo $zsk1 > /dev/null $SETTIME -K $dir -I now+2mo -D now+3mo $zsk1 > /dev/null
...@@ -218,8 +182,6 @@ $SETTIME -K $dir -I now+2mo -D now+3mo $zsk1 > /dev/null ...@@ -218,8 +182,6 @@ $SETTIME -K $dir -I now+2mo -D now+3mo $zsk1 > /dev/null
# Test 19: Key has been published/active a long time # Test 19: Key has been published/active a long time
dir=19-old-keys dir=19-old-keys
echo_i "set up $dir" echo_i "set up $dir"
rm -f $dir/K*.key
rm -f $dir/K*.private
ksk1=`$KEYGEN -K $dir -a rsasha1 -3fk example.com` ksk1=`$KEYGEN -K $dir -a rsasha1 -3fk example.com`
zsk1=`$KEYGEN -K $dir -a rsasha1 -3 example.com` zsk1=`$KEYGEN -K $dir -a rsasha1 -3 example.com`
$SETTIME -K $dir -P now-2y -A now-2y $ksk1 > /dev/null $SETTIME -K $dir -P now-2y -A now-2y $ksk1 > /dev/null
......
...@@ -18,7 +18,6 @@ copy_setports ns1/named.conf.in ns1/named.conf ...@@ -18,7 +18,6 @@ copy_setports ns1/named.conf.in ns1/named.conf
copy_setports ns2/named.conf.in ns2/named.conf copy_setports ns2/named.conf.in ns2/named.conf
copy_setports ns3/named.conf.in ns3/named.conf copy_setports ns3/named.conf.in ns3/named.conf
rm -f ns1/example.db.raw
cp ns1/example.db ns2/ cp ns1/example.db ns2/
cp ns2/formerly-text.db.in ns2/formerly-text.db cp ns2/formerly-text.db.in ns2/formerly-text.db
cp ns1/large.db.in ns1/large.db cp ns1/large.db.in ns1/large.db
......
...@@ -12,7 +12,11 @@ ...@@ -12,7 +12,11 @@
SYSTEMTESTTOP=.. SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh . $SYSTEMTESTTOP/conf.sh
#
# jnl and database files MUST be removed before we start
#
$SHELL clean.sh $SHELL clean.sh
copy_setports ns1/named.conf.in ns1/named.conf copy_setports ns1/named.conf.in ns1/named.conf
copy_setports ns2/named.conf.in ns2/named.conf copy_setports ns2/named.conf.in ns2/named.conf
copy_setports ns3/named.conf.in ns3/named.conf copy_setports ns3/named.conf.in ns3/named.conf
...@@ -25,15 +29,6 @@ copy_setports ns10/named.conf.in ns10/named.conf ...@@ -25,15 +29,6 @@ copy_setports ns10/named.conf.in ns10/named.conf
copy_setports verylarge.in verylarge copy_setports verylarge.in verylarge
#
# jnl and database files MUST be removed before we start
#
rm -f ns1/*.jnl ns1/example.db ns2/*.jnl ns2/example.bk
rm -f ns2/update.bk ns2/update.alt.bk
rm -f ns3/example.db.jnl
rm -f ns3/too-big.test.db.jnl
cp -f ns1/example1.db ns1/example.db cp -f ns1/example1.db ns1/example.db
sed 's/example.nil/other.nil/g' ns1/example1.db > ns1/other.db sed 's/example.nil/other.nil/g' ns1/example1.db > ns1/other.db
sed 's/example.nil/unixtime.nil/g' ns1/example1.db > ns1/unixtime.db sed 's/example.nil/unixtime.nil/g' ns1/example1.db > ns1/unixtime.db
...@@ -71,13 +66,11 @@ $DDNSCONFGEN -q -a hmac-sha512 -k sha512-key -z keytests.nil > ns1/sha512.key ...@@ -71,13 +66,11 @@ $DDNSCONFGEN -q -a hmac-sha512 -k sha512-key -z keytests.nil > ns1/sha512.key
(cd ns3; $SHELL -e sign.sh) (cd ns3; $SHELL -e sign.sh)
cp -f ns1/many.test.db.in ns1/many.test.db cp -f ns1/many.test.db.in ns1/many.test.db
rm -f ns1/many.test.db.jnl
cp ns1/sample.db.in ns1/sample.db cp ns1/sample.db.in ns1/sample.db
cp ns2/sample.db.in ns2/sample.db cp ns2/sample.db.in ns2/sample.db
cp -f ns1/maxjournal.db.in ns1/maxjournal.db cp -f ns1/maxjournal.db.in ns1/maxjournal.db
rm -f ns1/maxjournal.db.jnl
cp -f ns5/local.db.in ns5/local.db cp -f ns5/local.db.in ns5/local.db
cp -f ns6/in-addr.db.in ns6/in-addr.db cp -f ns6/in-addr.db.in ns6/in-addr.db
......
...@@ -157,9 +157,6 @@ $PERL -e 'for ($cnt = $val = 1; $cnt <= 3000; ++$cnt) { ...@@ -157,9 +157,6 @@ $PERL -e 'for ($cnt = $val = 1; $cnt <= 3000; ++$cnt) {
cp ns2/bl.tld2.db.in ns2/bl.tld2.db cp ns2/bl.tld2.db.in ns2/bl.tld2.db
cp ns5/empty.db.in ns5/empty.db cp ns5/empty.db.in ns5/empty.db
cp ns5/empty.db.in ns5/policy2.db cp ns5/empty.db.in ns5/policy2.db
rm -f ns2/bl.tld2.db.jnl
rm -f ns5/empty.db.jnl
rm -f cp ns5/policy2.db.jnl
# Run dnsrpzd to get the license and prime the static policy zones # Run dnsrpzd to get the license and prime the static policy zones
if test -n "$TEST_DNSRPS"; then if test -n "$TEST_DNSRPS"; then
......
...@@ -21,8 +21,6 @@ sed 's/SERVER_CONFIG_PLACEHOLDER/server-names { "ns.example.net"; };/' tmp > ns2 ...@@ -21,8 +21,6 @@ sed 's/SERVER_CONFIG_PLACEHOLDER/server-names { "ns.example.net"; };/' tmp > ns2
copy_setports ns3/named.conf.in tmp copy_setports ns3/named.conf.in tmp
sed 's/EXAMPLE_ZONE_PLACEHOLDER/zone "example" { type master; file "example.db.signed"; };/' tmp > ns3/named.conf sed 's/EXAMPLE_ZONE_PLACEHOLDER/zone "example" { type master; file "example.db.signed"; };/' tmp > ns3/named.conf
rm -f tmp
copy_setports ns4/named.conf.in ns4/named.conf copy_setports ns4/named.conf.in ns4/named.conf
cd ns3 && $SHELL -e sign.sh cd ns3 && $SHELL -e sign.sh
...@@ -31,5 +31,4 @@ then ...@@ -31,5 +31,4 @@ then
echo $keyname > keyname echo $keyname > keyname
else else
cat ns1/example1.db > ns1/example2.db cat ns1/example1.db > ns1/example2.db
rm -f keyname
fi fi
...@@ -15,12 +15,6 @@ SYSTEMTESTTOP=.. ...@@ -15,12 +15,6 @@ SYSTEMTESTTOP=..