4487. [test] Make system tests work on Windows. [RT #42931]

This commit is contained in:
Witold Krecicki
2016-10-19 17:18:42 +02:00
parent 17697000bc
commit cc51cd2d20
273 changed files with 9139 additions and 559 deletions

View File

@@ -17,12 +17,12 @@ zonefile=root.db
(cd ../ns6 && $SHELL sign.sh )
(cd ../ns7 && $SHELL sign.sh )
cp ../ns2/dsset-example. .
cp ../ns2/dsset-dlv. .
cp ../ns2/dsset-in-addr.arpa. .
cp ../ns2/dsset-example$TP .
cp ../ns2/dsset-dlv$TP .
cp ../ns2/dsset-in-addr.arpa$TP .
grep "8 [12] " ../ns2/dsset-algroll. > dsset-algroll.
cp ../ns6/dsset-optout-tld. .
grep "8 [12] " ../ns2/dsset-algroll$TP > dsset-algroll$TP
cp ../ns6/dsset-optout-tld$TP .
keyname=`$KEYGEN -q -r $RANDFILE -a RSAMD5 -b 768 -n zone $zone`

View File

@@ -23,7 +23,7 @@ for subdomain in secure badds bogus dynamic keyless nsec3 optout \
ttlpatch split-dnssec split-smart expired expiring upper lower \
dnskey-unknown dnskey-nsec3-unknown managed-future revkey
do
cp ../ns3/dsset-$subdomain.example. .
cp ../ns3/dsset-$subdomain.example$TP .
done
keyname1=`$KEYGEN -q -r $RANDFILE -a DSA -b 768 -n zone $zone`
@@ -110,10 +110,11 @@ $SIGNER -P -g -r $RANDFILE -o $privzone -l dlv $privzonefile > /dev/null
dlvzone=dlv.
dlvinfile=dlv.db.in
dlvzonefile=dlv.db
dlvsetfile=dlvset-`echo $privzone |sed -e "s/\.$//g"`$TP
dlvkeyname=`$KEYGEN -q -r $RANDFILE -a RSAMD5 -b 768 -n zone $dlvzone`
cat $dlvinfile $dlvkeyname.key dlvset-$privzone > $dlvzonefile
cat $dlvinfile $dlvkeyname.key $dlvsetfile > $dlvzonefile
$SIGNER -P -g -r $RANDFILE -o $dlvzone $dlvzonefile > /dev/null

View File

@@ -205,7 +205,8 @@ $SIGNER -P -3 - -r $RANDFILE -o $zone -O full -f ${zonefile}.tmp $zonefile > /de
awk '$4 == "DNSKEY" { $7 = 100; print } $4 == "RRSIG" { $6 = 100; print } { print }' ${zonefile}.tmp > ${zonefile}.signed
$DSFROMKEY -A -f ${zonefile}.signed $zone > dsset-${zone}
DSFILE=dsset-`echo ${zone} |sed -e "s/\.$//g"`$TP
$DSFROMKEY -A -f ${zonefile}.signed $zone > $DSFILE
#
# A zone with a unknown DNSKEY algorithm + unknown NSEC3 hash algorithm (-U).
@@ -223,7 +224,8 @@ $SIGNER -P -3 - -r $RANDFILE -o $zone -U -O full -f ${zonefile}.tmp $zonefile >
awk '$4 == "DNSKEY" { $7 = 100; print } $4 == "RRSIG" { $6 = 100; print } { print }' ${zonefile}.tmp > ${zonefile}.signed
$DSFROMKEY -A -f ${zonefile}.signed $zone > dsset-${zone}
DSFILE=dsset-`echo ${zone} |sed -e "s/\.$//g"`$TP
$DSFROMKEY -A -f ${zonefile}.signed $zone > $DSFILE
#
# A multiple parameter nsec3 zone.
@@ -498,7 +500,7 @@ keyname=`$KEYGEN -q -r $RANDFILE -a RSAMD5 -b 768 -n zone $zone`
cat $infile $keyname.key >$zonefile
$SIGNER -P -r $RANDFILE -o $zone $zonefile > /dev/null 2>&1
sed -e 's/bogus/badds/g' < dsset-bogus.example. > dsset-badds.example.
sed -e 's/bogus/badds/g' < dsset-bogus.example$TP > dsset-badds.example$TP
#
# A zone with future signatures.

View File

@@ -1864,7 +1864,7 @@ ret=0
echo "I:killing ns4 with SIGTERM"
cd ns4
kill -TERM `cat named.pid`
$KILL -TERM `cat named.pid`
rm -f named.pid
cd ..
@@ -1927,7 +1927,7 @@ grep "flags:[^;]* ad[^;]*;" dig.out.ns4.test$n.2 > /dev/null || ret=1
echo "I:killing ns4 with SIGTERM"
cd ns4
kill -TERM `cat named.pid`
$KILL -TERM `cat named.pid`
rm -f named.pid
cd ..
@@ -1986,7 +1986,7 @@ grep "flags:[^;]* ad[^;]*;" dig.out.ns4.test$n.2 > /dev/null || ret=1
echo "I:killing ns4 with SIGTERM"
cd ns4
kill -TERM `cat named.pid`
$KILL -TERM `cat named.pid`
rm -f named.pid
cd ..
@@ -2035,7 +2035,7 @@ echo "I: testing loading out of bounds lifetime from NTA file ($n)"
echo "I:killing ns4 with SIGTERM"
cd ns4
kill -TERM `cat named.pid`
$KILL -TERM `cat named.pid`
rm -f named.pid
cd ..
@@ -2538,7 +2538,7 @@ awk '{
for (i=1;i<7;i++) printf("%s ", $i);
for (i=7;i<=NF;i++) printf("%s", $i);
printf("\n");
}' < ns1/dsset-algroll. > canonical2.$n || ret=1
}' < ns1/dsset-algroll$TP > canonical2.$n || ret=1
diff -b canonical1.$n canonical2.$n > /dev/null 2>&1 || ret=1
n=`expr $n + 1`
if [ $ret != 0 ]; then echo "I:failed"; fi
@@ -3002,7 +3002,7 @@ else
+trusted-key=ns3/trusted-future.key > dig.out.ns3.test$n &
pid=$!
sleep 1
kill -9 $pid 2> /dev/null
$KILL -9 $pid 2> /dev/null
wait $pid
grep ";; No DNSKEY is valid to check the RRSIG of the RRset: FAILED" dig.out.ns3.test$n > /dev/null || ret=1
if [ $ret != 0 ]; then echo "I:failed"; fi