Blame bin/tests/system/dscp/tests.sh

Packit Service ae04f2
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
Packit Service ae04f2
#
Packit Service ae04f2
# This Source Code Form is subject to the terms of the Mozilla Public
Packit Service ae04f2
# License, v. 2.0. If a copy of the MPL was not distributed with this
Packit Service ae04f2
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
Packit Service ae04f2
#
Packit Service ae04f2
# See the COPYRIGHT file distributed with this work for additional
Packit Service ae04f2
# information regarding copyright ownership.
Packit Service ae04f2
Packit Service ae04f2
SYSTEMTESTTOP=..
Packit Service ae04f2
. $SYSTEMTESTTOP/conf.sh
Packit Service ae04f2
Packit Service ae04f2
DIGOPTS="+tcp +noadd +nosea +nostat +noquest -p ${PORT}"
Packit Service ae04f2
Packit Service ae04f2
status=0
Packit Service ae04f2
Packit Service ae04f2
#
Packit Service ae04f2
# 10.53.0.1 10.53.0.2 10.53.0.3 have a global dscp setting;
Packit Service ae04f2
# 10.53.0.4 10.53.0.5 10.53.0.6 have dscp set in option *-source clauses;
Packit Service ae04f2
# 10.53.0.7 has dscp set in zone *-source clauses;
Packit Service ae04f2
#
Packit Service ae04f2
for server in 10.53.0.1 10.53.0.2 10.53.0.3 10.53.0.4 10.53.0.5 \
Packit Service ae04f2
	      10.53.0.6 10.53.0.7
Packit Service ae04f2
do
Packit Service ae04f2
	echo_i "testing root SOA lookup at $server"
Packit Service ae04f2
	for i in 0 1 2 3 4 5 6 7 8 9
Packit Service ae04f2
	do
Packit Service ae04f2
		ret=0
Packit Service ae04f2
		$DIG $DIGOPTS @$server soa . > dig.out.$server
Packit Service ae04f2
		grep "status: NOERROR" dig.out.$server > /dev/null || ret=1
Packit Service ae04f2
		test $ret = 0 && break
Packit Service ae04f2
		sleep 1
Packit Service ae04f2
	done
Packit Service ae04f2
	test $ret = 0 || { echo_i "failed"; status=`expr $status + $ret`; }
Packit Service ae04f2
done
Packit Service ae04f2
Packit Service ae04f2
echo_i "exit status: $status"
Packit Service ae04f2
[ $status -eq 0 ] || exit 1