tests.sh revision 247bf378605811d695e968dbe930a7fc45c0038e
8ec174ad4e570842495b2f1f3836160af90f69afBrian Wellington#!/bin/sh
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews#
8ec174ad4e570842495b2f1f3836160af90f69afBrian Wellington - Copyright (C) 2004, 2007, 2011 Internet Systems Consortium, Inc. ("ISC")
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews - Copyright (C) 2000, 2001 Internet Software Consortium.
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews -
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews - Permission to use, copy, modify, and/or distribute this software for any
8ec174ad4e570842495b2f1f3836160af90f69afBrian Wellington - purpose with or without fee is hereby granted, provided that the above
8ec174ad4e570842495b2f1f3836160af90f69afBrian Wellington - copyright notice and this permission notice appear in all copies.
d7201de09b85929a86b157f4b2d91667c68c6b52Automatic Updater -
8ec174ad4e570842495b2f1f3836160af90f69afBrian Wellington - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
8ec174ad4e570842495b2f1f3836160af90f69afBrian Wellington - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
8ec174ad4e570842495b2f1f3836160af90f69afBrian Wellington - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
8ec174ad4e570842495b2f1f3836160af90f69afBrian Wellington - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
8ec174ad4e570842495b2f1f3836160af90f69afBrian Wellington - PERFORMANCE OF THIS SOFTWARE.
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉
8ec174ad4e570842495b2f1f3836160af90f69afBrian Wellington# $Id: tests.sh,v 1.19 2011/11/04 23:46:15 tbox Exp $
1f1d36a87b65186d9f89aac7f456ab1fd2a39ef6Andreas Gustafsson
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉SYSTEMTESTTOP=..
8ec174ad4e570842495b2f1f3836160af90f69afBrian Wellington. $SYSTEMTESTTOP/conf.sh
8ec174ad4e570842495b2f1f3836160af90f69afBrian Wellington
status=0
echo "I:1000 A records"
$DIG +tcp +norec 1000.example. @10.53.0.1 a -p 5300 > dig.out.1000 || 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.1000 || status=1
echo "I:2000 A records"
$DIG +tcp +norec 2000.example. @10.53.0.1 a -p 5300 > dig.out.2000 || 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.2000 || status=1
echo "I:3000 A records"
$DIG +tcp +norec 3000.example. @10.53.0.1 a -p 5300 > dig.out.3000 || 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.3000 || status=1
echo "I:4000 A records"
$DIG +tcp +norec 4000.example. @10.53.0.1 a -p 5300 > dig.out.4000 || 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.4000 || status=1
echo "I:exactly maximum rrset"
$DIG +tcp +norec +noedns a-maximum-rrset.example. @10.53.0.1 a -p 5300 > dig.out.a-maximum-rrset \
|| 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.a-maximum-rrset || status=1
echo "I:exceed maximum rrset (5000 A records)"
$DIG +tcp +norec +noadd 5000.example. @10.53.0.1 a -p 5300 > dig.out.exceed || status=1
# Look for truncation bit (tc).
grep 'flags: .*tc.*;' dig.out.exceed > /dev/null || {
echo "I:TC bit was not set"
status=1
}
echo "I:exit status: $status"
exit $status