pulled up the newest system tests

This commit is contained in:
Andreas Gustafsson
2000-07-10 04:52:11 +00:00
parent 807c0c6103
commit 64bb0617d7
22 changed files with 334 additions and 394 deletions
+4 -53
View File
@@ -13,7 +13,7 @@
# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
# SOFTWARE.
# $Id: Makefile.in,v 1.10.2.1 2000/06/26 21:33:29 gson Exp $
# $Id: Makefile.in,v 1.10.2.2 2000/07/10 04:51:41 gson Exp $
@BIND9_INCLUDES@
SUBDIRS = lwresd
@@ -21,61 +21,12 @@ TARGETS =
@BIND9_MAKE_RULES@
test: dnssec_test limits_test notify_test stub_test views_test xfer_test \
xferquota_test
test: subdirs
sh ./runall.sh
distclean::
clean distclean::
sh ./cleanall.sh
clean distclean:: dnssec_test_clean limits_test_clean notify_test_clean \
stub_test_clean views_test_clean xfer_test_clean \
xferquota_test_clean
installdirs:
install::
dnssec_test:
sh ./run.sh dnssec
limits_test:
sh ./run.sh limits
notify_test:
sh ./run.sh notify
stub_test:
sh ./run.sh stub
views_test:
sh ./run.sh views
xfer_test:
sh ./run.sh xfer
xferquota_test:
sh ./run.sh xferquota
distclean::
rm -f conf.sh
dnssec_test_clean:
sh ./clean.sh dnssec
limits_test_clean:
sh ./clean.sh limits
notify_test_clean:
sh ./clean.sh notify
stub_test_clean:
sh ./clean.sh stub
views_test_clean:
sh ./clean.sh views
xfer_test_clean:
sh ./clean.sh xfer
xferquota_test_clean:
sh ./clean.sh xferquota
-35
View File
@@ -1,35 +0,0 @@
#!/bin/sh
#
# Copyright (C) 2000 Internet Software Consortium.
#
# Permission to use, copy, modify, and 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
# ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
# CONSORTIUM 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: clean.sh,v 1.7 2000/06/22 21:51:23 tale Exp $
#
# Clean up after system tests.
#
SYSTEMTESTTOP=.
. $SYSTEMTESTTOP/conf.sh
find . -type f \( \
-name 'K*' -o -name '*~' -o -name '*.core' -o -name '*.log' \
-o -name '*.pid' -o -name '*.keyset' \
\) -print | xargs rm -f
for d in $SUBDIRS
do
test ! -f $d/clean.sh || ( cd $d && sh clean.sh )
done
+12 -2
View File
@@ -15,7 +15,7 @@
# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
# SOFTWARE.
# $Id: cleanall.sh,v 1.1 2000/06/23 21:28:17 mws Exp $
# $Id: cleanall.sh,v 1.1.2.1 2000/07/10 04:51:43 gson Exp $
#
# Clean up after system tests.
@@ -24,5 +24,15 @@
SYSTEMTESTTOP=.
. $SYSTEMTESTTOP/conf.sh
find . -type f -name '*.run' -print | xargs rm -f
find . -type f \( \
-name 'K*' -o -name '*~' -o -name '*.core' -o -name '*.log' \
-o -name '*.pid' -o -name '*.keyset' \
\) -print | xargs rm -f
status=0
for d in $SUBDIRS
do
test ! -f $d/clean.sh || ( cd $d && sh clean.sh )
done
+5 -4
View File
@@ -15,7 +15,7 @@
# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
# SOFTWARE.
# $Id: conf.sh.in,v 1.4 2000/06/22 21:51:24 tale Exp $
# $Id: conf.sh.in,v 1.4.2.1 2000/07/10 04:51:44 gson Exp $
#
# Common configuration data for system tests, to be sourced into
@@ -31,14 +31,15 @@ TOP=`cd $TOP && pwd`
NAMED=$TOP/bin/named/named
LWRESD=$TOP/bin/named/lwresd
DIG=$TOP/bin/dig/dig
NSUPDATE=$TOP/bin/nsupdate/nsupdate
KEYGEN=$TOP/bin/dnssec/dnssec-keygen
SIGNER=$TOP/bin/dnssec/dnssec-signzone
KEYSIGNER=$TOP/bin/dnssec/dnssec-signkey
KEYSETTOOL=$TOP/bin/dnssec/dnssec-makekeyset
SUBDIRS="dnssec glue limits lwresd notify nsupdate stub views xfer xferquota"
# PERL will be an empty string if no perl interpreter was found.
PERL=@PERL@
SUBDIRS="xfer dnssec xferquota"
export NAMED LWRESD DIG KEYGEN SIGNER KEYSIGNER KEYSETTOOL PERL SUBDIRS
export NAMED LWRESD DIG NSUPDATE KEYGEN SIGNER KEYSIGNER KEYSETTOOL PERL \
SUBDIRS
+68 -52
View File
@@ -15,7 +15,7 @@
# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
# SOFTWARE.
# $Id: digcomp.pl,v 1.4 2000/06/22 21:51:25 tale Exp $
# $Id: digcomp.pl,v 1.4.2.1 2000/07/10 04:51:46 gson Exp $
# Compare two files, each with the output from dig, for differences.
# Ignore "unimportant" differences, like ordering of NS lines, TTL's,
@@ -27,69 +27,85 @@ $file2 = $ARGV[1];
$count = 0;
$firstname = "";
$status = 0;
$rcode1 = "none";
$rcode2 = "none";
open(FILE1, $file1) || die("$! $file1");
open(FILE1, $file1) || die("open: $file1: $!\n");
while (<FILE1>) {
chomp;
next if (/^;/);
if (/^(\S+)\s+\S+\s+(\S+)\s+(\S+)\s+(.+)$/) {
$name = $1;
$class = $2;
$type = $3;
$value = $4;
if ($type eq "SOA") {
$firstname = $name if ($firstname eq "");
if ($name eq $firstname) {
$name = "$name$count";
$count++;
}
}
if ($entry{"$name ; $class.$type ; $value"} ne "") {
$line = $entry{"$name ; $class.$type ; $value"};
print ("Duplicate entry in $file1:\n> $_\n< $line\n");
} else {
$entry{"$name ; $class.$type ; $value"} = $_;
}
}
chomp;
if (/^;.+status:\s+(\S+).+$/) {
$rcode1 = $1;
}
next if (/^;/);
if (/^(\S+)\s+\S+\s+(\S+)\s+(\S+)\s+(.+)$/) {
$name = $1;
$class = $2;
$type = $3;
$value = $4;
if ($type eq "SOA") {
$firstname = $name if ($firstname eq "");
if ($name eq $firstname) {
$name = "$name$count";
$count++;
}
}
if ($entry{"$name ; $class.$type ; $value"} ne "") {
$line = $entry{"$name ; $class.$type ; $value"};
print("Duplicate entry in $file1:\n> $_\n< $line\n");
} else {
$entry{"$name ; $class.$type ; $value"} = $_;
}
}
}
close (FILE1);
close(FILE1);
$printed = 0;
open(FILE2, $file2) || die("$! $file2");
open(FILE2, $file2) || die("open: $file2: $!\n");
while (<FILE2>) {
chomp;
next if (/^;/);
if (/^(\S+)\s+\S+\s+(\S+)\s+(\S+)\s+(.+)$/) {
$name = $1;
$class = $2;
$type = $3;
$value = $4;
if (($name eq $firstname) && ($type eq "SOA")) {
$count--;
$name = "$name$count";
}
if ($entry{"$name ; $class.$type ; $value"} ne "") {
$entry{"$name ; $class.$type ; $value"} = "";
} else {
print ("Only in $file2 (missing from $file1):\n") if ($printed == 0);
print ("> $_\n");
$printed++;
$status = 1;
}
}
chomp;
if (/^;.+status:\s+(\S+).+$/) {
$rcode2 = $1;
}
next if (/^;/);
if (/^(\S+)\s+\S+\s+(\S+)\s+(\S+)\s+(.+)$/) {
$name = $1;
$class = $2;
$type = $3;
$value = $4;
if (($name eq $firstname) && ($type eq "SOA")) {
$count--;
$name = "$name$count";
}
if ($entry{"$name ; $class.$type ; $value"} ne "") {
$entry{"$name ; $class.$type ; $value"} = "";
} else {
print("Only in $file2 (missing from $file1):\n")
if ($printed == 0);
print("> $_\n");
$printed++;
$status = 1;
}
}
}
close (FILE2);
close(FILE2);
$printed = 0;
foreach $key (keys(%entry)) {
if ($entry{$key} ne "") {
print ("Only in $file1 (missing from $file2):\n") if ($printed == 0);
print ("< $entry{$key}\n");
$status = 1;
$printed++;
}
if ($entry{$key} ne "") {
print("Only in $file1 (missing from $file2):\n")
if ($printed == 0);
print("< $entry{$key}\n");
$status = 1;
$printed++;
}
}
if ($rcode1 ne $rcode2) {
print("< status: $rcode1\n");
print("> status: $rcode2\n");
$status = 1;
}
exit($status);
@@ -13,7 +13,7 @@
; ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
; SOFTWARE.
; $Id: secure.example.db.in,v 1.4 2000/06/22 21:51:51 tale Exp $
; $Id: secure.example.db.in,v 1.4.2.1 2000/07/10 04:51:55 gson Exp $
$TTL 300 ; 5 minutes
@ IN SOA mname1. . (
@@ -30,6 +30,7 @@ a A 10.0.0.1
b A 10.0.0.2
d A 10.0.0.4
z A 10.0.0.26
x CNAME a
private NS ns.private
ns.private A 10.53.0.2
+46 -47
View File
@@ -15,7 +15,7 @@
# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
# SOFTWARE.
# $Id: tests.sh,v 1.15 2000/06/22 21:51:36 tale Exp $
# $Id: tests.sh,v 1.15.2.1 2000/07/10 04:51:53 gson Exp $
#
# Perform tests
@@ -25,72 +25,71 @@ SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
status=0
n=0
rm -f dig.out.*
DIGOPTS="+tcp +noadd +nosea +nostat +noquest +nocomm +nocmd -p 5300"
DIGOPTS="+tcp +noadd +nosea +nostat +noquest +nocmd -p 5300"
# Check the example. domain
$DIG $DIGOPTS a.example. @10.53.0.2 a > dig.out.ns2 || status=1
grep ";" dig.out.ns2
$DIG $DIGOPTS a.example. @10.53.0.2 a > dig.out.ns2.test$n || status=1
$DIG $DIGOPTS a.example. @10.53.0.3 a > dig.out.ns3.test$n || status=1
$PERL ../digcomp.pl dig.out.ns2.test$n dig.out.ns3.test$n || status=1
n=`expr $n + 1`
$DIG $DIGOPTS a.example. @10.53.0.3 a > dig.out.ns3 || status=1
grep ";" dig.out.ns3
$PERL ../digcomp.pl dig.out.ns2 dig.out.ns3 || status=1
rm -f dig.out.*
$DIG $DIGOPTS +noauth a.example. @10.53.0.2 a > dig.out.ns2 || status=1
grep ";" dig.out.ns2
$DIG $DIGOPTS +noauth a.example. @10.53.0.4 a > dig.out.ns4 || status=1
grep ";" dig.out.ns2
$PERL ../digcomp.pl dig.out.ns2 dig.out.ns4 || status=1
$DIG $DIGOPTS +noauth a.example. @10.53.0.2 a > dig.out.ns2.test$n || status=1
$DIG $DIGOPTS +noauth a.example. @10.53.0.4 a > dig.out.ns4.test$n || status=1
$PERL ../digcomp.pl dig.out.ns2.test$n dig.out.ns4.test$n || status=1
n=`expr $n + 1`
# Check the insecure.example domain
rm -f dig.out.*
$DIG $DIGOPTS a.insecure.example. @10.53.0.3 a > dig.out.ns3 || status=1
grep ";" dig.out.ns3
$DIG $DIGOPTS a.insecure.example. @10.53.0.4 a > dig.out.ns4 || status=1
grep ";" dig.out.ns4
$PERL ../digcomp.pl dig.out.ns3 dig.out.ns4 || status=1
$DIG $DIGOPTS a.insecure.example. @10.53.0.3 a > dig.out.ns3.test$n || status=1
$DIG $DIGOPTS a.insecure.example. @10.53.0.4 a > dig.out.ns4.test$n || status=1
$PERL ../digcomp.pl dig.out.ns3.test$n dig.out.ns4.test$n || status=1
n=`expr $n + 1`
# Check the secure.example domain
rm -f dig.out.*
$DIG $DIGOPTS a.secure.example. @10.53.0.3 a > dig.out.ns3 || status=1
grep ";" dig.out.ns3
$DIG $DIGOPTS a.secure.example. @10.53.0.4 a > dig.out.ns4 || status=1
grep ";" dig.out.ns4
$PERL ../digcomp.pl dig.out.ns3 dig.out.ns4 || status=1
$DIG $DIGOPTS a.secure.example. @10.53.0.3 a > dig.out.ns3.test$n || status=1
$DIG $DIGOPTS a.secure.example. @10.53.0.4 a > dig.out.ns4.test$n || status=1
$PERL ../digcomp.pl dig.out.ns3.test$n dig.out.ns4.test$n || status=1
n=`expr $n + 1`
# Check the bogus domain
rm -f dig.out.*
$DIG +tcp +noadd +nosea +nostat +noquest +nocmd -p 5300 \
a.bogus.example. @10.53.0.4 a > dig.out.ns4 || status=1
grep "SERVFAIL" dig.out.ns4 > /dev/null || status=1
a.bogus.example. @10.53.0.4 a > dig.out.ns4.test$n || status=1
grep "SERVFAIL" dig.out.ns4.test$n > /dev/null || status=1
n=`expr $n + 1`
# Try validating a key with a bad trusted key.
# This should fail.
$DIG +tcp +noadd +nosea +nostat +noquest +nocmd -p 5300 \
example. key @10.53.0.5 -p 5300 > dig.out.ns5 || status=1
grep "SERVFAIL" dig.out.ns5 > /dev/null || status=1
example. key @10.53.0.5 -p 5300 > dig.out.ns5.test$n || status=1
grep "SERVFAIL" dig.out.ns5.test$n > /dev/null || status=1
if [ $status != 0 ]; then
echo "R:FAIL"
else
echo "R:PASS"
fi
n=`expr $n + 1`
# Check the insecure.secure.example domain (insecurity proof)
$DIG $DIGOPTS a.insecure.secure.example. @10.53.0.2 a > dig.out.ns2.test$n \
|| status=1
$DIG $DIGOPTS a.insecure.secure.example. @10.53.0.4 a > dig.out.ns4.test$n \
|| status=1
$PERL ../digcomp.pl dig.out.ns2.test$n dig.out.ns4.test$n || status=1
n=`expr $n + 1`
# Check a negative response in insecure.secure.example
$DIG $DIGOPTS q.insecure.secure.example. @10.53.0.2 a > dig.out.ns2.test$n \
|| status=1
$DIG $DIGOPTS q.insecure.secure.example. @10.53.0.4 a > dig.out.ns4.test$n \
|| status=1
$PERL ../digcomp.pl dig.out.ns2.test$n dig.out.ns4.test$n || status=1
n=`expr $n + 1`
echo "I:exit status: $status"
exit $status
+7 -1
View File
@@ -15,7 +15,7 @@
# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
# SOFTWARE.
# $Id: ifconfig.sh,v 1.17 2000/06/25 16:52:31 gson Exp $
# $Id: ifconfig.sh,v 1.17.2.1 2000/07/10 04:51:47 gson Exp $
#
# Set up interface aliases for bind9 system tests.
@@ -50,6 +50,9 @@ case "$1" in
*-unknown-freebsdelf3.4)
ifconfig lo0 10.53.0.$ns alias
;;
*-unknown-freebsdelf4.0)
ifconfig lo0 10.53.0.$ns alias netmask 0xffffffff
;;
*-unknown-netbsd*)
ifconfig lo0 10.53.0.$ns alias
;;
@@ -97,6 +100,9 @@ case "$1" in
*-unknown-freebsdelf3.4)
ifconfig lo0 10.53.0.$ns delete
;;
*-unknown-freebsdelf4.0)
ifconfig lo0 10.53.0.$ns delete
;;
*-unknown-netbsd*)
ifconfig lo0 10.53.0.$ns delete
;;
+3 -4
View File
@@ -15,11 +15,10 @@
# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
# SOFTWARE.
# $Id: clean.sh,v 1.1.2.1 2000/06/28 19:33:16 gson Exp $
# $Id: clean.sh,v 1.1.2.2 2000/07/10 04:51:56 gson Exp $
#
# Clean up after zone transfer tests.
# Clean up after limits tests.
#
rm -f ns2/child.example.st dig.out.ns2
rm -f dig.out.ns1
+24 -39
View File
@@ -15,7 +15,7 @@
# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
# SOFTWARE.
# $Id: tests.sh,v 1.2.2.1 2000/06/28 19:33:17 gson Exp $
# $Id: tests.sh,v 1.2.2.2 2000/07/10 04:51:57 gson Exp $
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
@@ -24,53 +24,38 @@ SYSTEMTESTTOP=..
# Perform tests
#
# sleep 5
status=0
status=0;
$DIG +tcp +nosea +nostat +noquest +nocomm +nocmd +norec \
1000.example. @10.53.0.1 a -p 5300 > dig.out.ns1
status=`expr $status + $?`
echo "I:1000 A records"
$DIG +tcp +norec 1000.example. @10.53.0.1 a -p 5300 > dig.out.ns1 || status=1
#dig 1000.example. @10.53.0.1 a -p 5300 > knowngood.dig.out.1000
$PERL ../digcomp.pl knowngood.dig.out.1000 dig.out.ns1
status=`expr $status + $?`
$PERL ../digcomp.pl knowngood.dig.out.1000 dig.out.ns1 || status=1
$DIG +tcp +nosea +nostat +noquest +nocomm +nocmd +norec \
2000.example. @10.53.0.1 a -p 5300 > dig.out.ns1
status=`expr $status + $?`
echo "I:2000 A records"
$DIG +tcp +norec 2000.example. @10.53.0.1 a -p 5300 > dig.out.ns1 || status=1
#dig 2000.example. @10.53.0.1 a -p 5300 > knowngood.dig.out.2000
$PERL ../digcomp.pl knowngood.dig.out.2000 dig.out.ns1
status=`expr $status + $?`
$PERL ../digcomp.pl knowngood.dig.out.2000 dig.out.ns1 || status=1
$DIG +tcp +nosea +nostat +noquest +nocomm +nocmd +norec \
3000.example. @10.53.0.1 a -p 5300 > dig.out.ns1
status=`expr $status + $?`
echo "I:3000 A records"
$DIG +tcp +norec 3000.example. @10.53.0.1 a -p 5300 > dig.out.ns1 || status=1
#dig 3000.example. @10.53.0.1 a -p 5300 > knowngood.dig.out.3000
$PERL ../digcomp.pl knowngood.dig.out.3000 dig.out.ns1
status=`expr $status + $?`
$PERL ../digcomp.pl knowngood.dig.out.3000 dig.out.ns1 || status=1
$DIG +tcp +nosea +nostat +noquest +nocomm +nocmd +norec \
4000.example. @10.53.0.1 a -p 5300 > dig.out.ns1
status=`expr $status + $?`
echo "I:4000 A records"
$DIG +tcp +norec 4000.example. @10.53.0.1 a -p 5300 > dig.out.ns1 || status=1
#dig 4000.example. @10.53.0.1 a -p 5300 > knowngood.dig.out.4000
$PERL ../digcomp.pl knowngood.dig.out.4000 dig.out.ns1
status=`expr $status + $?`
$PERL ../digcomp.pl knowngood.dig.out.4000 dig.out.ns1 || status=1
$DIG +tcp +nosea +nostat +noquest +nocomm +nocmd +norec \
a-maximum-rrset.example. @10.53.0.1 a -p 5300 > dig.out.ns1
status=`expr $status + $?`
echo "I:exactly maximum rrset"
$DIG +tcp +norec a-maximum-rrset.example. @10.53.0.1 a -p 5300 > dig.out.ns1 \
|| status=1
#dig a-maximum-rrset.example. @10.53.0.1 a -p 5300 > knowngood.dig.out.a-maximum-rrset
$PERL ../digcomp.pl knowngood.dig.out.a-maximum-rrset dig.out.ns1
status=`expr $status + $?`
$PERL ../digcomp.pl knowngood.dig.out.a-maximum-rrset dig.out.ns1 || status=1
$DIG +tcp +nosea +nostat +noquest +nocmd +norec \
5000.example. @10.53.0.1 a -p 5300 > dig.out.ns1
status=`expr $status + $?`
grep 'flags: qr aa tc ad;' dig.out.ns1
status=`expr $status + $?`
echo "I:exceed maxmimum rrset (5000 A records)"
$DIG +tcp +norec 5000.example. @10.53.0.1 a -p 5300 > dig.out.ns1 || status=1
# Look for truncation bit (tc).
grep 'flags: qr aa tc ad;' dig.out.ns1 > /dev/null || status=1
if [ $status != 0 ]; then
echo "R:FAIL"
else
echo "R:PASS"
fi
echo "I:exit status: $status"
exit $status
+11 -1
View File
@@ -15,7 +15,7 @@
* SOFTWARE.
*/
/* $Id: lwtest.c,v 1.6.2.2 2000/06/28 22:53:21 gson Exp $ */
/* $Id: lwtest.c,v 1.6.2.3 2000/07/10 04:52:01 gson Exp $ */
#include <config.h>
@@ -27,6 +27,7 @@
#include <lwres/lwres.h>
#include <lwres/netdb.h>
#include <lwres/net.h>
/*
* XXX getnameinfo errors, which don't appear to be standard.
@@ -98,6 +99,7 @@ test_noop(void) {
pkt.recvlength = 0x55667788;
pkt.result = 0xdeadbeef;
noopresponse.datalength = strlen((char *)TESTSTRING);
noopresponse.data = TESTSTRING;
ret = lwres_noopresponse_render(ctx, &noopresponse, &pkt, &b);
CHECK(ret, "lwres_noopresponse_render");
@@ -443,12 +445,20 @@ test_getnameinfo(const char *address, int af, const char *name) {
memset(&sin, 0, sizeof(sin));
ret = inet_pton(AF_INET, address, &sin.sin_addr.s_addr);
assert(ret == 1);
sin.sin_family = AF_INET;
#ifdef LWRES_PLATFORM_HAVESALEN
sin.sin_len = sizeof(sin);
#endif
sa = (struct sockaddr *) &sin;
salen = sizeof(sin);
} else {
memset(&sin6, 0, sizeof(sin6));
ret = inet_pton(AF_INET6, address, sin6.sin6_addr.s6_addr);
assert(ret == 1);
sin6.sin6_family = AF_INET6;
#ifdef LWRES_PLATFORM_HAVESALEN
sin6.sin6_len = sizeof(sin6);
#endif
sa = (struct sockaddr *) &sin6;
salen = sizeof(sin6);
}
+5 -9
View File
@@ -15,7 +15,7 @@
# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
# SOFTWARE.
# $Id: tests.sh,v 1.2 2000/06/22 21:52:07 tale Exp $
# $Id: tests.sh,v 1.2.2.1 2000/07/10 04:52:02 gson Exp $
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
@@ -26,13 +26,9 @@ SYSTEMTESTTOP=..
sleep 5
status=0;
./lwtest
status=`expr $status + $?`
status=0
./lwtest || status=1
if [ $status != 0 ]; then
echo "R:FAIL"
else
echo "R:PASS"
fi
echo "I:exit status: $status"
exit $status
+33 -32
View File
@@ -15,7 +15,7 @@
# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
# SOFTWARE.
# $Id: tests.sh,v 1.16 2000/06/22 21:52:19 tale Exp $
# $Id: tests.sh,v 1.16.2.1 2000/07/10 04:52:04 gson Exp $
#
# Perform tests
@@ -25,18 +25,16 @@ SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
status=0
$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd a.example.\
@10.53.0.2 a -p 5300 > dig.out.ns2
status=`expr $status + $?`
@10.53.0.2 a -p 5300 > dig.out.ns2 || status=1
grep ";" dig.out.ns2
$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd a.example.\
@10.53.0.3 a -p 5300 > dig.out.ns3
status=`expr $status + $?`
@10.53.0.3 a -p 5300 > dig.out.ns3 || status=1
grep ";" dig.out.ns3
$PERL ../digcomp.pl dig.out.ns2 dig.out.ns3
status=`expr $status + $?`
$PERL ../digcomp.pl dig.out.ns2 dig.out.ns3 || status=1
rm -f ns2/example.db
cp ns2/example2.db ns2/example.db
@@ -45,61 +43,64 @@ kill -HUP `cat ns2/named.pid`
sleep 60
$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd a.example.\
@10.53.0.2 a -p 5300 > dig.out.ns2
status=`expr $status + $?`
@10.53.0.2 a -p 5300 > dig.out.ns2 || status=1
grep ";" dig.out.ns2
$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd a.example.\
@10.53.0.3 a -p 5300 > dig.out.ns3
status=`expr $status + $?`
@10.53.0.3 a -p 5300 > dig.out.ns3 || status=1
grep ";" dig.out.ns3
$PERL ../digcomp.pl dig.out.ns2 dig.out.ns3
status=`expr $status + $?`
$PERL ../digcomp.pl dig.out.ns2 dig.out.ns3 || status=1
kill `cat ns3/named.pid`
kill -TERM `cat ns3/named.pid`
rm -f ns2/example.db
cp ns2/example3.db ns2/example.db
sleep 6
if [ -f ns3/named.pid ]; then
echo "I:ns3 didn't die when sent a SIGTERM"
kill -KILL `cat ns3/named.pid`
status=1
fi
kill -HUP `cat ns2/named.pid`
(cd ns3 ; $NAMED -c named.conf -d 99 -g >> named.run 2>&1 & )
sleep 60
$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd a.example.\
@10.53.0.2 a -p 5300 > dig.out.ns2
status=`expr $status + $?`
@10.53.0.2 a -p 5300 > dig.out.ns2 || status=1
grep ";" dig.out.ns2
$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd a.example.\
@10.53.0.3 a -p 5300 > dig.out.ns3
status=`expr $status + $?`
@10.53.0.3 a -p 5300 > dig.out.ns3 || status=1
grep ";" dig.out.ns3
$PERL ../digcomp.pl dig.out.ns2 dig.out.ns3
status=`expr $status + $?`
$PERL ../digcomp.pl dig.out.ns2 dig.out.ns3 || status=1
rm -f ns2/example.db
kill `cat ns2/named.pid`
kill -TERM `cat ns2/named.pid`
sleep 6
if [ -f ns2/named.pid ]; then
echo "I:ns2 didn't die when sent a SIGTERM"
kill -KILL `cat ns2/named.pid`
status=1
fi
cp ns2/example4.db ns2/example.db
sleep 6
(cd ns2 ; $NAMED -c named.conf -d 99 -g >> named.run 2>&1 & )
sleep 60
$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd a.example.\
@10.53.0.2 a -p 5300 > dig.out.ns2
status=`expr $status + $?`
@10.53.0.2 a -p 5300 > dig.out.ns2 || status=1
grep ";" dig.out.ns2
$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd a.example.\
@10.53.0.3 a -p 5300 > dig.out.ns3
status=`expr $status + $?`
@10.53.0.3 a -p 5300 > dig.out.ns3 || status=1
grep ";" dig.out.ns3
$PERL ../digcomp.pl dig.out.ns2 dig.out.ns3
status=`expr $status + $?`
$PERL ../digcomp.pl dig.out.ns2 dig.out.ns3 || status=1
if [ $status != 0 ]; then
echo "R:FAIL"
else
echo "R:PASS"
fi
echo "I:exit status: $status"
exit $status
+9 -1
View File
@@ -15,7 +15,7 @@
# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
# SOFTWARE.
# $Id: run.sh,v 1.26 2000/06/22 21:51:27 tale Exp $
# $Id: run.sh,v 1.26.2.1 2000/07/10 04:51:48 gson Exp $
#
# Run a system test.
@@ -92,6 +92,14 @@ fi
# Shutdown
sh stop.sh $test
status=`expr $status + $?`
if [ $status != 0 ]; then
echo "R:FAIL"
else
echo "R:PASS"
fi
# Cleanup
if test -f $test/clean.sh
then
+10 -4
View File
@@ -15,7 +15,7 @@
# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
# SOFTWARE.
# $Id: start.sh,v 1.21.2.1 2000/06/26 21:21:18 gson Exp $
# $Id: start.sh,v 1.21.2.2 2000/07/10 04:51:49 gson Exp $
#
# Start name servers for running system tests.
@@ -46,7 +46,13 @@ do
(
cd $d
rm -f *.jnl *.bk *.st named.run
$NAMED -c named.conf -d 99 -g >named.run 2>&1 &
if test -f namedopts
then
opts=`cat namedopts`
else
opts=""
fi
$NAMED $opts -c named.conf -d 99 -g >named.run 2>&1 &
x=1
while test ! -f named.pid
do
@@ -88,7 +94,7 @@ do
do
x=`expr $x + 1`
if [ $x = 5 ]; then
echo "I: Couldn't start lwresd $d"
echo "I:Couldn't start lwresd $d"
exit 1
fi
sleep 1
@@ -118,7 +124,7 @@ do
if [ $try = 30 ]; then
cd ..
sh ./stop.sh $1
echo "I: no response from $d"
echo "I:no response from $d"
echo "R:FAIL"
exit 1
fi
+10 -3
View File
@@ -15,7 +15,7 @@
# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
# SOFTWARE.
# $Id: stop.sh,v 1.8 2000/06/22 21:51:30 tale Exp $
# $Id: stop.sh,v 1.8.2.1 2000/07/10 04:51:50 gson Exp $
#
# Stop name servers.
@@ -23,6 +23,8 @@
test $# -gt 0 || { echo "usage: $0 test-directory" >&2; exit 1; }
status=0
cd $1
for d in ns*
@@ -47,7 +49,10 @@ for d in ns*
do
pidfile="$d/named.pid"
if [ -f $pidfile ]; then
echo "I:$d didn't die when sent a SIGTERM"
status=`expr $status + 1`
kill -KILL `cat $pidfile`
rm -f $pidfile
fi
done
@@ -55,9 +60,11 @@ for d in lwresd*
do
pidfile="$d/lwresd.pid"
if [ -f $pidfile ]; then
echo "I:$d didn't die when sent a SIGTERM"
status=`expr $status + 1`
kill -KILL `cat $pidfile`
rm -f $pidfile
fi
done
sleep 10
exit $status
+3 -4
View File
@@ -15,11 +15,10 @@
# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
# SOFTWARE.
# $Id: clean.sh,v 1.2 2000/06/22 21:52:32 tale Exp $
# $Id: clean.sh,v 1.2.2.1 2000/07/10 04:52:06 gson Exp $
#
# Clean up after zone transfer tests.
# Clean up after stub tests.
#
rm -f ns2/child.example.st dig.out.ns2
rm -f dig.out.ns3 ns3/child.example.st
+14 -23
View File
@@ -15,7 +15,7 @@
# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
# SOFTWARE.
# $Id: tests.sh,v 1.3 2000/06/22 21:52:33 tale Exp $
# $Id: tests.sh,v 1.3.2.1 2000/07/10 04:52:07 gson Exp $
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
@@ -24,29 +24,20 @@ SYSTEMTESTTOP=..
# Perform tests
#
# sleep 5
status=0
status=0;
$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd data.child.example. \
@10.53.0.3 axfr -p 5300 > dig.out.ns3
status=`expr $status + $?`
grep "; Transfer failed." dig.out.ns3 > /dev/null
status=`expr $status + $?`
echo "I:trying an axfr that should be denied (NOTAUTH)"
$DIG +tcp data.child.example. @10.53.0.3 axfr -p 5300 > dig.out.ns3 || status=1
grep "; Transfer failed." dig.out.ns3 > /dev/null || status=1
$DIG +tcp +nosea +nostat +noquest +nocomm +nocmd +norec \
data.child.example. @10.53.0.3 txt -p 5300 > dig.out.ns3
status=`expr $status + $?`
$PERL ../digcomp.pl knowngood.dig.out.norec dig.out.ns3
status=`expr $status + $?`
echo "I:look for stub zone data without recursion (should not be found)"
$DIG +tcp +norec data.child.example. @10.53.0.3 txt -p 5300 > dig.out.ns3 \
|| status=1
$PERL ../digcomp.pl knowngood.dig.out.norec dig.out.ns3 || status=1
$DIG +tcp +nosea +nostat +noquest +nocomm +nocmd +rec \
data.child.example. @10.53.0.3 txt -p 5300 > dig.out.ns3
status=`expr $status + $?`
$PERL ../digcomp.pl knowngood.dig.out.rec dig.out.ns3
status=`expr $status + $?`
echo "I:look for stub zone data with recursion (should be found)"
$DIG +tcp data.child.example. @10.53.0.3 txt -p 5300 > dig.out.ns3 || status=1
$PERL ../digcomp.pl knowngood.dig.out.rec dig.out.ns3 || status=1
if [ $status != 0 ]; then
echo "R:FAIL"
else
echo "R:PASS"
fi
echo "I:exit status: $status"
exit $status
+2 -1
View File
@@ -15,7 +15,7 @@
# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
# SOFTWARE.
# $Id: testsock.pl,v 1.5.2.1 2000/06/26 20:50:23 gson Exp $
# $Id: testsock.pl,v 1.5.2.2 2000/07/10 04:51:51 gson Exp $
# Test whether the interfaces on 10.53.0.* are up.
@@ -36,4 +36,5 @@ for ($id = 1 ; $id < 6 ; $id++) {
or die sprintf("$0: bind(%s, %d): $!\n",
inet_ntoa($addr), $port);
close(SOCK);
sleep (1);
}
+43 -36
View File
@@ -15,7 +15,7 @@
# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
# SOFTWARE.
# $Id: tests.sh,v 1.12 2000/06/22 21:52:45 tale Exp $
# $Id: tests.sh,v 1.12.2.1 2000/07/10 04:52:09 gson Exp $
#
# Perform tests
@@ -24,59 +24,66 @@
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
status=0;
../../../dig/dig +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd +noauth\
a.example. @10.53.0.2 any -p 5300 > dig.out.ns2.1
status=`expr $status + $?`
grep ";" dig.out.ns2.1
status=0
$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd +noauth\
a.example. @10.53.0.3 any -p 5300 > dig.out.ns3.1
status=`expr $status + $?`
grep ";" dig.out.ns3.1
echo "I:fetching a.example from ns2's initial configuration"
$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd +noauth \
a.example. @10.53.0.2 any -p 5300 > dig.out.ns2.1 || status=1
grep ";" dig.out.ns2.1 # XXXDCL why is this here?
echo "I:fetching a.example from ns3's initial configuration"
$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd +noauth \
a.example. @10.53.0.3 any -p 5300 > dig.out.ns3.1 || status=1
grep ";" dig.out.ns3.1 # XXXDCL why is this here?
echo "I:copying in new configuratons for ns2 and ns3"
rm -f ns2/named.conf ns3/named.conf ns2/example.db
cp ns2/named2.conf ns2/named.conf
cp ns3/named2.conf ns3/named.conf
cp ns2/example2.db ns2/example.db
echo "I:sleeping five seconds then reloading ns2 and ns3"
sleep 5
kill -HUP `cat ns2/named.pid`
kill -HUP `cat ns3/named.pid`
echo "I:sleeping one minute"
sleep 60
$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd +noauth\
-b 10.53.0.4 a.example. @10.53.0.4 any -p 5300 > dig.out.ns4.2
status=`expr $status + $?`
grep ";" dig.out.ns4.2
echo "I:fetching a.example from ns2's 10.53.0.4, source address 10.53.0.4"
$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd +noauth \
-b 10.53.0.4 a.example. @10.53.0.4 any -p 5300 > dig.out.ns4.2 \
|| status=1
grep ";" dig.out.ns4.2 # XXXDCL why is this here?
$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd +noauth\
-b 10.53.0.2 a.example. @10.53.0.2 any -p 5300 > dig.out.ns2.2
status=`expr $status + $?`
grep ";" dig.out.ns2.2
echo "I:fetching a.example from ns2's 10.53.0.2, source address 10.53.0.2"
$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd +noauth \
-b 10.53.0.2 a.example. @10.53.0.2 any -p 5300 > dig.out.ns2.2 \
|| status=1
grep ";" dig.out.ns2.2 # XXXDCL why is this here?
$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd +noauth\
@10.53.0.3 a.example. any -p 5300 > dig.out.ns3.2
status=`expr $status + $?`
grep ";" dig.out.ns3.2
echo "I:fetching a.example from ns3's 10.53.0.3, source address defaulted"
$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd +noauth \
@10.53.0.3 a.example. any -p 5300 > dig.out.ns3.2 || status=1
grep ";" dig.out.ns3.2 # XXXDCL why is this here?
$PERL ../digcomp.pl dig.out.ns2.1 dig.out.ns4.2
status=`expr $status + $?`
echo "I:comparing ns3's initial a.example to one from reconfigured 10.53.0.2"
$PERL ../digcomp.pl dig.out.ns3.1 dig.out.ns2.2 || status=1
$PERL ../digcomp.pl dig.out.ns3.1 dig.out.ns2.2
status=`expr $status + $?`
echo "I:comparing ns3's initial a.example to one from reconfigured 10.53.0.3"
$PERL ../digcomp.pl dig.out.ns3.1 dig.out.ns3.2 || status=1
$PERL ../digcomp.pl dig.out.ns3.1 dig.out.ns3.2
status=`expr $status + $?`
echo "I:comparing ns2's initial a.example to one from reconfigured 10.53.0.4"
$PERL ../digcomp.pl dig.out.ns2.1 dig.out.ns4.2 || status=1
echo "Differences should be found in the following lines:"
echo "I:differences should be found in the following lines, with"
echo "I:intmail.example in ns3.2 and mail.example in ns2.1, when"
echo "I:comparing ns2's initial a.example to one from reconfigured 10.53.0.3"
$PERL ../digcomp.pl dig.out.ns2.1 dig.out.ns3.2
if [ $? = 0 ]; then
echo "No differences found. Something's wrong."
status=`expr $status + 1`
echo "I:no differences found. something's wrong."
status=1
fi
if [ $status != 0 ]; then
echo "R:FAIL"
else
echo "R:PASS"
fi
echo "I:exit status: $status"
exit $status
+10 -20
View File
@@ -15,7 +15,7 @@
# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
# SOFTWARE.
# $Id: tests.sh,v 1.15 2000/06/22 21:53:01 tale Exp $
# $Id: tests.sh,v 1.15.2.1 2000/07/10 04:52:10 gson Exp $
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
@@ -28,38 +28,28 @@ sleep 5
status=0;
$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd example. \
@10.53.0.2 axfr -p 5300 > dig.out.ns2
status=`expr $status + $?`
@10.53.0.2 axfr -p 5300 > dig.out.ns2 || status=1
grep ";" dig.out.ns2
$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd example. \
@10.53.0.3 axfr -p 5300 > dig.out.ns3
status=`expr $status + $?`
@10.53.0.3 axfr -p 5300 > dig.out.ns3 || status=1
grep ";" dig.out.ns3
$PERL ../digcomp.pl knowngood.dig.out dig.out.ns2
status=`expr $status + $?`
$PERL ../digcomp.pl knowngood.dig.out dig.out.ns2 || status=1
$PERL ../digcomp.pl knowngood.dig.out dig.out.ns3
status=`expr $status + $?`
$PERL ../digcomp.pl knowngood.dig.out dig.out.ns3 || status=1
../../../dig/dig +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd \
tsigzone. @10.53.0.2 axfr -y tsigzone.:1234abcd8765 -p 5300 \
> dig.out.ns2
status=`expr $status + $?`
> dig.out.ns2 || status=1
grep ";" dig.out.ns2
../../../dig/dig +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd \
tsigzone. @10.53.0.3 axfr -y tsigzone.:1234abcd8765 -p 5300 \
> dig.out.ns3
status=`expr $status + $?`
> dig.out.ns3 || status=1
grep ";" dig.out.ns3
$PERL ../digcomp.pl dig.out.ns2 dig.out.ns3
status=`expr $status + $?`
$PERL ../digcomp.pl dig.out.ns2 dig.out.ns3 || status=1
if [ $status != 0 ]; then
echo "R:FAIL"
else
echo "R:PASS"
fi
echo "I:exit status: $status"
exit $status
+13 -22
View File
@@ -15,7 +15,7 @@
# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
# SOFTWARE.
# $Id: tests.sh,v 1.11 2000/06/22 21:53:15 tale Exp $
# $Id: tests.sh,v 1.11.2.1 2000/07/10 04:52:11 gson Exp $
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
@@ -28,7 +28,7 @@ count=0
ticks=0
while [ $count != 300 ]; do
if [ $ticks = 1 ]; then
echo "I: Changing test zone..."
echo "I:Changing test zone..."
cp ns1/changing2.db ns1/changing.db
kill -HUP `cat ns1/named.pid`
fi
@@ -36,45 +36,36 @@ while [ $count != 300 ]; do
ticks=`expr $ticks + 1`
seconds=`expr $ticks \* 1`
if [ $ticks = 60 ]; then
echo "Took too long to load zones"
echo "R:FAIL"
echo "I:Took too long to load zones"
exit 1
fi
count=`cat ns2/zone*.bk | grep xyzzy | wc -l`
echo "I:Have $count zones up in $seconds seconds"
done
status=0;
status=0
$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd \
zone000099.example. @10.53.0.1 axfr -p 5300 > dig.out.ns1
status=`expr $status + $?`
zone000099.example. @10.53.0.1 axfr -p 5300 > dig.out.ns1 || status=1
grep ";" dig.out.ns1
$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd \
zone000099.example. @10.53.0.2 axfr -p 5300 > dig.out.ns2
status=`expr $status + $?`
zone000099.example. @10.53.0.2 axfr -p 5300 > dig.out.ns2 || status=1
grep ";" dig.out.ns2
$PERL ../digcomp.pl dig.out.ns1 dig.out.ns2
status=`expr $status + $?`
$PERL ../digcomp.pl dig.out.ns1 dig.out.ns2 || status=1
sleep 5
$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd \
a.changing. @10.53.0.1 a -p 5300 > dig.out.ns1
status=`expr $status + $?`
a.changing. @10.53.0.1 a -p 5300 > dig.out.ns1 || status=1
grep ";" dig.out.ns1
$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd \
a.changing. @10.53.0.2 a -p 5300 > dig.out.ns2
status=`expr $status + $?`
a.changing. @10.53.0.2 a -p 5300 > dig.out.ns2 || status=1
grep ";" dig.out.ns2
$PERL ../digcomp.pl dig.out.ns1 dig.out.ns2
status=`expr $status + $?`
$PERL ../digcomp.pl dig.out.ns1 dig.out.ns2 || status=1
if [ $status != 0 ]; then
echo "R:FAIL"
else
echo "R:PASS"
fi
echo "I:exit status: $status"
exit $status