tests.sh revision a4240242cd6514aa04fae0d53fea7c983b4134d9
#
# Copyright (C) 2011, 2012, 2016, 2017 Internet Systems Consortium, Inc. ("ISC")
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
status=0
n=0
echo "I:checking short dname from authoritative"
ret=0
echo "I:checking short dname from recursive"
ret=0
echo "I:checking long dname from authoritative"
ret=0
echo "I:checking long dname from recursive"
ret=0
echo "I:checking (too) long dname from authoritative"
ret=0
$DIG 01234567890123456789012345678901234567890123456789.longlonglonglonglonglonglonglonglonglonglonglonglonglonglong.longlonglonglonglonglonglonglonglonglonglonglonglonglonglong.longlonglonglonglonglonglonglonglonglonglonglonglonglonglong.long-dname.example @10.53.0.2 a -p 5300 > dig.out.ns2.toolong || ret=1
echo "I:checking (too) long dname from recursive"
ret=0
$DIG 01234567890123456789012345678901234567890123456789.longlonglonglonglonglonglonglonglonglonglonglonglonglonglong.longlonglonglonglonglonglonglonglonglonglonglonglonglonglong.longlonglonglonglonglonglonglonglonglonglonglonglonglonglong.long-dname.example @10.53.0.4 a -p 5300 > dig.out.ns4.toolong || ret=1
echo "I:checking cname to dname from authoritative"
ret=0
echo "I:checking cname to dname from recursive"
ret=0
n=`expr $n + 1`
echo "I:checking dname is returned with synthesized cname before dname ($n)"
ret=0
n=`expr $n + 1`
echo "I:checking dname is returned with cname to synthesized cname before dname ($n)"
ret=0
grep '^cname-to-synth2-then-dname\.example\.broken\..*CNAME.*name\.synth2-then-dname\.example\.broken.$' dig.out.test$n > /dev/null || ret=1
grep '^name\.synth2-then-dname\.example\.broken\..*CNAME.*name.$' dig.out.test$n > /dev/null || ret=1
echo "I:exit status: $status"