3 # Copyright (C) 2014 Internet Systems Consortium, Inc. ("ISC")
5 # Permission to use, copy, modify, and/or distribute this software for any
6 # purpose with or without fee is hereby granted, provided that the above
7 # copyright notice and this permission notice appear in all copies.
9 # THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
10 # REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11 # AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
12 # INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13 # LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15 # PERFORMANCE OF THIS SOFTWARE.
17 # Id: tests.sh,v 1.22 2012/02/09 23:47:18 tbox Exp
20 .
$SYSTEMTESTTOP/conf.sh
32 grep 'flags:.* tc[^;]*;' $1 > /dev
/null
38 echo "I:checking that named-checkconf detects error in $bad"
39 $CHECKCONF $bad > /dev
/null
2>&1
40 if [ $?
!= 1 ]; then echo "I:failed"; ret
=1; fi
41 status
=`expr $status + $ret`
45 echo "I:checking SIT token returned to empty SIT option ($n)"
47 $DIG +qr
+sit version.
bind txt ch @
10.53.0.1 -p 5300 > dig.out.
test$n
48 grep SIT
: dig.out.
test$n > /dev
/null || ret
=1
49 grep "status: NOERROR" dig.out.
test$n > /dev
/null || ret
=1
50 if [ $ret != 0 ]; then echo "I:failed"; fi
51 status
=`expr $status + $ret`
54 echo "I:checking response size without SIT ($n)"
56 $DIG large.example txt @
10.53.0.1 -p 5300 +ignore
> dig.out.
test$n
57 havetc
dig.out.
test$n || ret
=1
58 if [ $ret != 0 ]; then echo "I:failed"; fi
59 status
=`expr $status + $ret`
62 echo "I:checking response size without valid SIT ($n)"
64 $DIG +sit large.example txt @
10.53.0.1 -p 5300 +ignore
> dig.out.
test$n
65 havetc
dig.out.
test$n || ret
=1
66 grep "; SIT:.*(good)" dig.out.
test$n > /dev
/null || ret
=1
67 if [ $ret != 0 ]; then echo "I:failed"; fi
68 status
=`expr $status + $ret`
71 echo "I:checking response size with SIT ($n)"
73 $DIG +sit large.example txt @
10.53.0.1 -p 5300 > dig.out.
test$n.l
74 sit
=`getsit dig.out.test$n.l`
75 $DIG +qr
+sit
=$sit large.example txt @
10.53.0.1 -p 5300 +ignore
> dig.out.
test$n
76 havetc
dig.out.
test$n && ret
=1
77 grep "; SIT:.*(good)" dig.out.
test$n > /dev
/null || ret
=1
78 if [ $ret != 0 ]; then echo "I:failed"; fi
79 status
=`expr $status + $ret`
82 echo "I:checking response size with SIT recursive ($n)"
84 $DIG +qr
+sit
=$sit large.xxx txt @
10.53.0.1 -p 5300 +ignore
> dig.out.
test$n
85 havetc
dig.out.
test$n && ret
=1
86 grep "; SIT:.*(good)" dig.out.
test$n > /dev
/null || ret
=1
87 if [ $ret != 0 ]; then echo "I:failed"; fi
88 status
=`expr $status + $ret`
91 echo "I:checking for SIT value in adb ($n)"
93 $RNDC -c ..
/common
/rndc.conf
-s 10.53.0.1 -p 9953 dumpdb
95 grep "10.53.0.2.*\[sit=" ns
1/named_dump.db
> /dev
/null|| ret
=1
96 if [ $ret != 0 ]; then echo "I:failed"; fi
97 status
=`expr $status + $ret`
99 echo "I:exit status: $status"