From: Evan Hunt Date: Sat, 19 Jan 2019 09:48:12 +0000 (-0800) Subject: fix broken masterformat test X-Git-Tag: v9.12.4rc1~6^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d15aed83254329986a3426613b6261bd5f8159ff;p=thirdparty%2Fbind9.git fix broken masterformat test - dig command had the @ parameter in the wrong place - private-dnskey and private-cdnskey are queried in a separate loop, which strips 'private-' from the name to determine the qtype (cherry picked from commit bc7b34d6ef4e9a539da5f09795f130d4c392104b) --- diff --git a/bin/tests/system/masterformat/tests.sh b/bin/tests/system/masterformat/tests.sh index 12416732d93..b8c9a4f2727 100755 --- a/bin/tests/system/masterformat/tests.sh +++ b/bin/tests/system/masterformat/tests.sh @@ -98,16 +98,21 @@ ret=0 set -- 1 2 3 for zone in example example-explicit example-compat; do for server in "$@"; do - for name in ns mx a aaaa cname dname txt rrsig nsec \ - dnskey ds cdnskey cds private-dnskey private-cdnskey; do - dig_with_opts "$name.$zone." "$name" "@10.53.0.$server" + for qname in ns mx a aaaa cname dname txt rrsig nsec \ + dnskey ds cdnskey cds; do + qtype="$qname" + dig_with_opts @10.53.0.${server} -q ${qname}.${zone}. -t ${qtype} echo - done > "dig.out.$zone.$server.test$n" + done > dig.out.${zone}.${server}.test${n} + for qname in private-dnskey private-cdnskey; do + qtype=$(expr "$qname" : '.*-\(.*\)') + dig_with_opts @10.53.0.${server} -q ${qname}.${zone}. -t ${qtype} + done >> dig.out.${zone}.${server}.test${n} done - digcomp "dig.out.$zone.1.test$n" "dig.out.$zone.2.test$n" || ret=1 + digcomp dig.out.${zone}.1.test${n} dig.out.${zone}.2.test${n} || ret=1 if [ "$zone" = "example" ]; then set -- 1 2 - digcomp "dig.out.$zone.1.test$n" "dig.out.$zone.3.test$n" || ret=1 + digcomp dig.out.${zone}.1.test${n} dig.out.${zone}.3.test${n} || ret=1 fi done n=$((n+1))