2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-29 05:28:00 +00:00

97 lines
2.6 KiB
Bash
Raw Normal View History

2000-05-17 22:38:50 +00:00
#!/bin/sh
2000-05-19 22:45:47 +00:00
#
# 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.
2000-06-22 22:00:42 +00:00
# $Id: tests.sh,v 1.15 2000/06/22 21:51:36 tale Exp $
2000-05-17 22:38:50 +00:00
#
# Perform tests
#
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
status=0
2000-05-17 22:38:50 +00:00
2000-05-18 22:49:29 +00:00
rm -f dig.out.*
2000-05-17 22:38:50 +00:00
2000-06-06 23:41:55 +00:00
DIGOPTS="+tcp +noadd +nosea +nostat +noquest +nocomm +nocmd -p 5300"
2000-05-17 22:38:50 +00:00
# Check the example. domain
2000-06-16 22:39:45 +00:00
$DIG $DIGOPTS a.example. @10.53.0.2 a > dig.out.ns2 || status=1
2000-05-17 22:38:50 +00:00
grep ";" dig.out.ns2
2000-06-16 22:39:45 +00:00
$DIG $DIGOPTS a.example. @10.53.0.3 a > dig.out.ns3 || status=1
2000-05-17 22:38:50 +00:00
grep ";" dig.out.ns3
2000-06-16 22:39:45 +00:00
$PERL ../digcomp.pl dig.out.ns2 dig.out.ns3 || status=1
2000-05-18 22:49:29 +00:00
rm -f dig.out.*
2000-06-16 22:39:45 +00:00
$DIG $DIGOPTS +noauth a.example. @10.53.0.2 a > dig.out.ns2 || status=1
2000-05-18 22:49:29 +00:00
grep ";" dig.out.ns2
2000-06-16 22:39:45 +00:00
$DIG $DIGOPTS +noauth a.example. @10.53.0.4 a > dig.out.ns4 || status=1
2000-05-18 22:49:29 +00:00
grep ";" dig.out.ns2
2000-05-17 22:38:50 +00:00
2000-06-16 22:39:45 +00:00
$PERL ../digcomp.pl dig.out.ns2 dig.out.ns4 || status=1
2000-05-18 22:49:29 +00:00
# Check the insecure.example domain
rm -f dig.out.*
2000-06-16 22:39:45 +00:00
$DIG $DIGOPTS a.insecure.example. @10.53.0.3 a > dig.out.ns3 || status=1
2000-05-18 22:49:29 +00:00
grep ";" dig.out.ns3
2000-06-16 22:39:45 +00:00
$DIG $DIGOPTS a.insecure.example. @10.53.0.4 a > dig.out.ns4 || status=1
2000-05-18 22:49:29 +00:00
grep ";" dig.out.ns4
2000-06-16 22:39:45 +00:00
$PERL ../digcomp.pl dig.out.ns3 dig.out.ns4 || status=1
2000-05-18 22:49:29 +00:00
# Check the secure.example domain
rm -f dig.out.*
2000-06-16 22:39:45 +00:00
$DIG $DIGOPTS a.secure.example. @10.53.0.3 a > dig.out.ns3 || status=1
2000-05-18 22:49:29 +00:00
grep ";" dig.out.ns3
2000-06-16 22:39:45 +00:00
$DIG $DIGOPTS a.secure.example. @10.53.0.4 a > dig.out.ns4 || status=1
2000-05-18 22:49:29 +00:00
grep ";" dig.out.ns4
2000-06-16 22:39:45 +00:00
$PERL ../digcomp.pl dig.out.ns3 dig.out.ns4 || status=1
2000-05-18 22:49:29 +00:00
# Check the bogus domain
rm -f dig.out.*
2000-06-19 19:06:47 +00:00
$DIG +tcp +noadd +nosea +nostat +noquest +nocmd -p 5300 \
2000-06-16 22:39:45 +00:00
a.bogus.example. @10.53.0.4 a > dig.out.ns4 || status=1
grep "SERVFAIL" dig.out.ns4 > /dev/null || status=1
2000-06-21 23:06:20 +00:00
# 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
2000-05-18 22:49:29 +00:00
if [ $status != 0 ]; then
2000-05-19 23:55:37 +00:00
echo "R:FAIL"
else
echo "R:PASS"
2000-05-18 22:49:29 +00:00
fi