]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
add a regression test for duplicate NS output
authorEvan Hunt <each@isc.org>
Mon, 24 Apr 2023 11:34:50 +0000 (12:34 +0100)
committerEvan Hunt <each@isc.org>
Tue, 2 May 2023 19:42:50 +0000 (12:42 -0700)
check that an NS RRset with two servers is only printed once.

bin/tests/system/digdelv/tests.sh

index d222e57d10480cfa66f846bc17833c74ef067ba3..6744c1aa78189eade7711250680f71f745e225c4 100644 (file)
@@ -1404,6 +1404,13 @@ if [ -x "$DELV" ] ; then
   if [ $ret -ne 0 ]; then echo_i "failed"; fi
   status=$((status+ret))
 
+  n=$((n+1))
+  echo_i "check NS output from delv +ns ($n)"
+  delv_with_opts -i +ns +nortrace +nostrace +nomtrace +novtrace +hint=../common/root.hint ns example > delv.out.test$n || ret=1
+  lines=$(awk '$1 == "example." && $4 == "NS" {print}' delv.out.test$n | wc -l)
+  [ $lines -eq 2 ] || ret=1
+  status=$((status+ret))
+
   n=$((n+1))
   echo_i "checking delv +ns (no validation) ($n)"
   ret=0