tests.sh revision 64196d78c88c745c3482e34bf1d24247cdc7c27c
44aae046c38e796e581110b7ecdf4478167d684dBob Halley# Copyright (C) 2010-2014, 2016 Internet Systems Consortium, Inc. ("ISC")
44aae046c38e796e581110b7ecdf4478167d684dBob Halley# This Source Code Form is subject to the terms of the Mozilla Public
44aae046c38e796e581110b7ecdf4478167d684dBob Halley# License, v. 2.0. If a copy of the MPL was not distributed with this
44aae046c38e796e581110b7ecdf4478167d684dBob Halley# file, You can obtain one at http://mozilla.org/MPL/2.0/.
44aae046c38e796e581110b7ecdf4478167d684dBob Halley# $Id: tests.sh,v 1.5 2011/02/03 07:35:55 marka Exp $
echo "I:checking that $conf is accepted ($n)"
n=`expr $n + 1`
echo "I:checking that $conf is rejected ($n)"
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
$DIG $DIGOPTS a-and-aaaa-and-mapped.example. @10.53.0.2 -b 10.53.0.4 aaaa > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
$DIG $DIGOPTS partially-excluded-only.example. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
$DIG $DIGOPTS partially-excluded-bad-a.example. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
$DIG $DIGOPTS partially-excluded-good-a.example. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
$DIG $DIGOPTS cname-excluded-only.example. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
$DIG $DIGOPTS cname-excluded-bad-a.example. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
$DIG $DIGOPTS cname-excluded-good-a.example. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
$DIG $DIGOPTS cname-a-not-mapped.example. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
n=`expr $n + 1`
$DIG $DIGOPTS cname-non-existent.example. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
$DIG $DIGOPTS partially-excluded-only.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
$DIG $DIGOPTS partially-excluded-bad-a.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
$DIG $DIGOPTS partially-excluded-good-a.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
$DIG $DIGOPTS cname-excluded-only.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
$DIG $DIGOPTS cname-excluded-bad-a.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
$DIG $DIGOPTS cname-excluded-good-a.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
$DIG $DIGOPTS cname-a-not-mapped.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
n=`expr $n + 1`
$DIG $DIGOPTS cname-non-existent.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
n=`expr $n + 1`
$DIG $DIGOPTS +norec excluded-only.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
$DIG $DIGOPTS +norec excluded-bad-a.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
$DIG $DIGOPTS +norec excluded-good-a.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
$DIG $DIGOPTS +norec partially-excluded-only.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
echo "I: checking partially-excluded AAAA and non-mapped A lookup works, recursive only +norec ($n)"
$DIG $DIGOPTS +norec partially-excluded-bad-a.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
echo "I: checking partially-excluded only AAAA and mapped A lookup works, recursive only +norec ($n)"
$DIG $DIGOPTS +norec partially-excluded-good-a.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
$DIG $DIGOPTS +norec a-not-mapped.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
n=`expr $n + 1`
$DIG $DIGOPTS +norec non-existent.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
$DIG $DIGOPTS +norec cname-aaaa-only.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
$DIG $DIGOPTS +norec cname-excluded-only.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
echo "I: checking excluded AAAA and non-mapped A via CNAME lookup works, recursive only +norec ($n)"
$DIG $DIGOPTS +norec cname-excluded-bad-a.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
echo "I: checking excluded only AAAA and mapped A via CNAME lookup works, recursive only +norec ($n)"
$DIG $DIGOPTS +norec cname-excluded-good-a.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
$DIG $DIGOPTS +norec cname-aaaa-only.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
$DIG $DIGOPTS +norec cname-a-only.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
$DIG $DIGOPTS +norec cname-a-and-aaaa.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
$DIG $DIGOPTS +norec cname-a-not-mapped.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
$DIG $DIGOPTS +norec cname-mx-only.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
$DIG $DIGOPTS +norec cname-non-existent.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
$DIG $DIGOPTS cname-excluded-only.example. @10.53.0.2 -b 10.53.0.3 aaaa > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
$DIG $DIGOPTS cname-excluded-bad-a.example. @10.53.0.2 -b 10.53.0.3 aaaa > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
$DIG $DIGOPTS cname-excluded-good-a.example. @10.53.0.2 -b 10.53.0.3 aaaa > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
$DIG $DIGOPTS cname-a-not-mapped.example. @10.53.0.2 -b 10.53.0.3 aaaa > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
n=`expr $n + 1`
$DIG $DIGOPTS cname-non-existent.example. @10.53.0.2 -b 10.53.0.3 aaaa > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
$DIG $DIGOPTS cname-excluded-only.signed. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
$DIG $DIGOPTS cname-excluded-bad-a.signed. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
$DIG $DIGOPTS cname-excluded-good-a.signed. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
$DIG $DIGOPTS +dnssec excluded-only.signed. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
$DIG $DIGOPTS +dnssec excluded-bad-a.signed. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
$DIG $DIGOPTS +dnssec excluded-good-a.signed. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
$DIG $DIGOPTS +dnssec a-not-mapped.signed. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
n=`expr $n + 1`
$DIG $DIGOPTS +dnssec non-existent.signed. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
$DIG $DIGOPTS +dnssec cname-aaaa-only.signed. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
$DIG $DIGOPTS +dnssec cname-excluded-only.signed. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
echo "I: checking excluded AAAA and non-mapped A via CNAME lookup is signed zone works with +dnssec ($n)"
$DIG $DIGOPTS +dnssec cname-excluded-bad-a.signed. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
echo "I: checking excluded only AAAA and mapped A via CNAME lookup is signed zone works with +dnssec ($n)"
$DIG $DIGOPTS +dnssec cname-excluded-good-a.signed. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
$DIG $DIGOPTS +dnssec cname-aaaa-only.signed. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
$DIG $DIGOPTS +dnssec cname-a-only.signed. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
$DIG $DIGOPTS +dnssec cname-a-and-aaaa.signed. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
$DIG $DIGOPTS +dnssec cname-a-not-mapped.signed. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
$DIG $DIGOPTS +dnssec cname-mx-only.signed. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
$DIG $DIGOPTS +dnssec cname-non-existent.signed. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
echo "I: checking $rev ($n)"
n=`expr $n + 1`
$DIG $DIGOPTS soa 0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.a.a.a.a.1.0.0.2.ip6.arpa @10.53.0.2 > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
$DIG $DIGOPTS aaaa ttl-less-than-600.example +rec -b 10.53.0.2 @10.53.0.2 > dig.out.ns1.test$n || ret=1
n=`expr $n + 1`
$DIG $DIGOPTS aaaa ttl-more-than-600.example +rec -b 10.53.0.2 @10.53.0.2 > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
$DIG $DIGOPTS aaaa ttl-less-than-minimum.example +rec -b 10.53.0.2 @10.53.0.2 > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
$DIG $DIGOPTS aaaa ttl-more-than-minimum.example +rec -b 10.53.0.2 @10.53.0.2 > dig.out.ns2.test$n || ret=1
n=`expr $n + 1`
n=`expr $n + 1`
echo "I:exit status: $status"