2000-06-23 13:05:47 -04:00
|
|
|
#!/bin/sh
|
|
|
|
|
#
|
2001-01-09 17:01:04 -05:00
|
|
|
# Copyright (C) 2000, 2001 Internet Software Consortium.
|
2000-07-31 21:33:37 -04:00
|
|
|
#
|
2000-06-23 13:05:47 -04:00
|
|
|
# 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.
|
2000-07-31 21:33:37 -04:00
|
|
|
#
|
2000-07-27 05:55:03 -04:00
|
|
|
# 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-23 13:05:47 -04:00
|
|
|
|
2001-02-13 21:42:10 -05:00
|
|
|
# $Id: tests.sh,v 1.14 2001/02/14 02:42:10 gson Exp $
|
2000-06-28 15:01:52 -04:00
|
|
|
|
2000-06-23 13:05:47 -04:00
|
|
|
SYSTEMTESTTOP=..
|
|
|
|
|
. $SYSTEMTESTTOP/conf.sh
|
|
|
|
|
|
2000-07-05 22:33:42 -04:00
|
|
|
status=0
|
2000-06-23 13:05:47 -04:00
|
|
|
|
2000-07-08 12:36:29 -04:00
|
|
|
echo "I:1000 A records"
|
2001-02-13 21:42:10 -05:00
|
|
|
$DIG +tcp +norec 1000.example. @10.53.0.1 a -p 5300 > dig.out.1000 || status=1
|
2000-06-23 13:05:47 -04:00
|
|
|
#dig 1000.example. @10.53.0.1 a -p 5300 > knowngood.dig.out.1000
|
2001-02-13 21:42:10 -05:00
|
|
|
$PERL ../digcomp.pl knowngood.dig.out.1000 dig.out.1000 || status=1
|
2000-06-23 13:05:47 -04:00
|
|
|
|
2000-07-08 12:36:29 -04:00
|
|
|
echo "I:2000 A records"
|
2001-02-13 21:42:10 -05:00
|
|
|
$DIG +tcp +norec 2000.example. @10.53.0.1 a -p 5300 > dig.out.2000 || status=1
|
2000-06-23 13:05:47 -04:00
|
|
|
#dig 2000.example. @10.53.0.1 a -p 5300 > knowngood.dig.out.2000
|
2001-02-13 21:42:10 -05:00
|
|
|
$PERL ../digcomp.pl knowngood.dig.out.2000 dig.out.2000 || status=1
|
2000-06-23 13:05:47 -04:00
|
|
|
|
2000-07-08 12:36:29 -04:00
|
|
|
echo "I:3000 A records"
|
2001-02-13 21:42:10 -05:00
|
|
|
$DIG +tcp +norec 3000.example. @10.53.0.1 a -p 5300 > dig.out.3000 || status=1
|
2000-06-23 13:05:47 -04:00
|
|
|
#dig 3000.example. @10.53.0.1 a -p 5300 > knowngood.dig.out.3000
|
2001-02-13 21:42:10 -05:00
|
|
|
$PERL ../digcomp.pl knowngood.dig.out.3000 dig.out.3000 || status=1
|
2000-06-23 13:05:47 -04:00
|
|
|
|
2000-07-08 12:36:29 -04:00
|
|
|
echo "I:4000 A records"
|
2001-02-13 21:42:10 -05:00
|
|
|
$DIG +tcp +norec 4000.example. @10.53.0.1 a -p 5300 > dig.out.4000 || status=1
|
2000-06-23 13:05:47 -04:00
|
|
|
#dig 4000.example. @10.53.0.1 a -p 5300 > knowngood.dig.out.4000
|
2001-02-13 21:42:10 -05:00
|
|
|
$PERL ../digcomp.pl knowngood.dig.out.4000 dig.out.4000 || status=1
|
2000-06-23 13:05:47 -04:00
|
|
|
|
2000-07-08 12:36:29 -04:00
|
|
|
echo "I:exactly maximum rrset"
|
2001-02-13 21:42:10 -05:00
|
|
|
$DIG +tcp +norec a-maximum-rrset.example. @10.53.0.1 a -p 5300 > dig.out.a-maximum-rrset \
|
2000-07-08 12:36:29 -04:00
|
|
|
|| status=1
|
2000-06-23 13:05:47 -04:00
|
|
|
#dig a-maximum-rrset.example. @10.53.0.1 a -p 5300 > knowngood.dig.out.a-maximum-rrset
|
2001-02-13 21:42:10 -05:00
|
|
|
$PERL ../digcomp.pl knowngood.dig.out.a-maximum-rrset dig.out.a-maximum-rrset || status=1
|
2000-06-23 13:05:47 -04:00
|
|
|
|
2000-09-22 19:17:57 -04:00
|
|
|
echo "I:exceed maximum rrset (5000 A records)"
|
2001-02-13 21:42:10 -05:00
|
|
|
$DIG +tcp +norec 5000.example. @10.53.0.1 a -p 5300 > dig.out.exceed || status=1
|
2000-07-08 12:36:29 -04:00
|
|
|
# Look for truncation bit (tc).
|
2001-02-13 21:42:10 -05:00
|
|
|
grep 'flags: .*tc.*;' dig.out.exceed > /dev/null || {
|
2000-11-21 20:21:44 -05:00
|
|
|
echo "I:TC bit was not set"
|
|
|
|
|
status=1
|
|
|
|
|
}
|
2000-06-23 13:05:47 -04:00
|
|
|
|
2000-07-07 14:25:20 -04:00
|
|
|
echo "I:exit status: $status"
|
2000-07-05 14:49:06 -04:00
|
|
|
exit $status
|