1#!/bin/sh 2# 3# Copyright (C) Internet Systems Consortium, Inc. ("ISC") 4# 5# This Source Code Form is subject to the terms of the Mozilla Public 6# License, v. 2.0. If a copy of the MPL was not distributed with this 7# file, you can obtain one at https://mozilla.org/MPL/2.0/. 8# 9# See the COPYRIGHT file distributed with this work for additional 10# information regarding copyright ownership. 11 12SYSTEMTESTTOP=.. 13. $SYSTEMTESTTOP/conf.sh 14 15status=0 16n=0 17 18rm -f dig.out.* 19 20DIGOPTS="+tcp +noau +noadd +nosea +nostat +nocmd +dnssec -p 5300" 21 22# Check the example. domain 23echo_i "checking that positive validation works ($n)" 24ret=0 25$DIG $DIGOPTS . @10.53.0.1 soa > dig.out.ns1.test$n || ret=1 26$DIG $DIGOPTS . @10.53.0.2 soa > dig.out.ns2.test$n || ret=1 27$PERL ../digcomp.pl dig.out.ns1.test$n dig.out.ns2.test$n || ret=1 28grep "flags:.*ad.*QUERY" dig.out.ns2.test$n > /dev/null || ret=1 29n=$((n+1)) 30if [ $ret != 0 ]; then echo_i "failed"; fi 31status=$((status+ret)) 32 33echo_i "exit status: $status" 34[ $status -eq 0 ] || exit 1 35