]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Suppress manykeys test on duplicate key ids
authorMark Andrews <marka@isc.org>
Thu, 8 Sep 2022 00:35:31 +0000 (10:35 +1000)
committerMark Andrews <marka@isc.org>
Thu, 15 Sep 2022 23:17:14 +0000 (09:17 +1000)
If there are duplicate key ids across multiple algorithms expected
output is no met.  We have fixed this in on main but decided to not
back port the fix as it will change the statistics channel output.

This change detects when there are duplicate key id across algorithms
as skips the sub test.

bin/tests/system/statschannel/tests.sh

index 1d0cff0589a80a9dd407d444087ca1142994555b..fe56e16227a03b2ee0595b381dd86b8a448ef88b 100644 (file)
@@ -277,6 +277,7 @@ ksk13_id=`cat ns2/$zone.ksk13.id`
 zsk13_id=`cat ns2/$zone.zsk13.id`
 ksk14_id=`cat ns2/$zone.ksk14.id`
 zsk14_id=`cat ns2/$zone.zsk14.id`
+num_ids=$( (echo $ksk8_id; echo $zsk8_id; echo $ksk13_id; echo $zsk13_id; echo $ksk14_id; echo $zsk14_id;) | sort -u | wc -l)
 # The dnssec zone has 10 RRsets to sign (including NSEC) with the ZSKs and one
 # RRset (DNSKEY) with the KSKs. So starting named with signatures that expire
 # almost right away, this should trigger 10 zsk and 1 ksk sign operations per
@@ -297,15 +298,20 @@ cat zones.expect | sort > zones.expect.$n
 rm -f zones.expect
 # Fetch and check the dnssec sign statistics.
 echo_i "fetching zone '$zone' stats data after zone maintenance at startup ($n)"
-if [ $PERL_XML ]; then
-    getzones xml $zone x$n || ret=1
-    cmp zones.out.x$n zones.expect.$n || ret=1
-fi
-if [ $PERL_JSON ]; then
-    getzones json 2 j$n || ret=1
-    cmp zones.out.j$n zones.expect.$n || ret=1
+if test $num_ids -eq 6
+then
+    if [ $PERL_XML ]; then
+        getzones xml $zone x$n || ret=1
+        cmp zones.out.x$n zones.expect.$n || ret=1
+    fi
+    if [ $PERL_JSON ]; then
+        getzones json 2 j$n || ret=1
+        cmp zones.out.j$n zones.expect.$n || ret=1
+    fi
+    if [ $ret != 0 ]; then echo_i "failed"; fi
+else
+    echo_i "skipped: duplicate key id detected (fixed in BIND 9.19)"
 fi
-if [ $ret != 0 ]; then echo_i "failed"; fi
 status=$((status + ret))
 n=$((n + 1))
 
@@ -335,15 +341,20 @@ cat zones.expect | sort > zones.expect.$n
 rm -f zones.expect
 # Fetch and check the dnssec sign statistics.
 echo_i "fetching zone '$zone' stats data after dynamic update ($n)"
-if [ $PERL_XML ]; then
-    getzones xml $zone x$n || ret=1
-    cmp zones.out.x$n zones.expect.$n || ret=1
-fi
-if [ $PERL_JSON ]; then
-    getzones json 2 j$n || ret=1
-    cmp zones.out.j$n zones.expect.$n || ret=1
+if test $num_ids -eq 6
+then
+    if [ $PERL_XML ]; then
+        getzones xml $zone x$n || ret=1
+        cmp zones.out.x$n zones.expect.$n || ret=1
+    fi
+    if [ $PERL_JSON ]; then
+        getzones json 2 j$n || ret=1
+        cmp zones.out.j$n zones.expect.$n || ret=1
+    fi
+    if [ $ret != 0 ]; then echo_i "failed"; fi
+else
+    echo_i "skipped: duplicate key id detected (fixed in BIND 9.19)"
 fi
-if [ $ret != 0 ]; then echo_i "failed"; fi
 status=$((status + ret))
 n=$((n + 1))