Commit 4be264f0a8 for bind
commit 4be264f0a849326f7f983ad0c93a4c3fe3caaace
Author: Petr Špaček <pspacek@isc.org>
Date: Thu Oct 22 12:41:45 2026 +0000
Detect DNSKEY TTL mismatches in autosign test
Piping awk into cat_i discarded its exit status, so these checks could
never fail.
Assisted-by: Claude:claude-opus-5-5
diff --git a/bin/tests/system/autosign/tests.sh b/bin/tests/system/autosign/tests.sh
index c75d3e490f..070504aea3 100755
--- a/bin/tests/system/autosign/tests.sh
+++ b/bin/tests/system/autosign/tests.sh
@@ -334,7 +334,8 @@ echo_i "checking TTLs of imported DNSKEYs (no default) ($n)"
ret=0
$DIG $DIGOPTS +tcp +noall +answer dnskey ttl1.example. @10.53.0.3 >dig.out.ns3.test$n || ret=1
[ -s dig.out.ns3.test$n ] || ret=1
-(awk 'BEGIN {r=0} $2 != 3600 {r=1; print "found TTL " $2} END {exit r}' dig.out.ns3.test$n | cat_i) || ret=1
+awk 'BEGIN {r=0} $2 != 3600 {r=1; print "found TTL " $2} END {exit r}' dig.out.ns3.test$n >awk.out.ns3.test$n || ret=1
+cat_i <awk.out.ns3.test$n
n=$((n + 1))
if [ $ret != 0 ]; then echo_i "failed"; fi
status=$((status + ret))
@@ -343,7 +344,8 @@ echo_i "checking TTLs of imported DNSKEYs (with default) ($n)"
ret=0
$DIG $DIGOPTS +tcp +noall +answer dnskey ttl2.example. @10.53.0.3 >dig.out.ns3.test$n || ret=1
[ -s dig.out.ns3.test$n ] || ret=1
-(awk 'BEGIN {r=0} $2 != 3600 {r=1; print "found TTL " $2} END {exit r}' dig.out.ns3.test$n | cat_i) || ret=1
+awk 'BEGIN {r=0} $2 != 3600 {r=1; print "found TTL " $2} END {exit r}' dig.out.ns3.test$n >awk.out.ns3.test$n || ret=1
+cat_i <awk.out.ns3.test$n
n=$((n + 1))
if [ $ret != 0 ]; then echo_i "failed"; fi
status=$((status + ret))
@@ -352,7 +354,8 @@ echo_i "checking TTLs of imported DNSKEYs (mismatched) ($n)"
ret=0
$DIG $DIGOPTS +tcp +noall +answer dnskey ttl3.example. @10.53.0.3 >dig.out.ns3.test$n || ret=1
[ -s dig.out.ns3.test$n ] || ret=1
-(awk 'BEGIN {r=0} $2 != 3600 {r=1; print "found TTL " $2} END {exit r}' dig.out.ns3.test$n | cat_i) || ret=1
+awk 'BEGIN {r=0} $2 != 3600 {r=1; print "found TTL " $2} END {exit r}' dig.out.ns3.test$n >awk.out.ns3.test$n || ret=1
+cat_i <awk.out.ns3.test$n
n=$((n + 1))
if [ $ret != 0 ]; then echo_i "failed"; fi
status=$((status + ret))
@@ -361,7 +364,8 @@ echo_i "checking TTLs of imported DNSKEYs (existing RRset) ($n)"
ret=0
$DIG $DIGOPTS +tcp +noall +answer dnskey ttl4.example. @10.53.0.3 >dig.out.ns3.test$n || ret=1
[ -s dig.out.ns3.test$n ] || ret=1
-(awk 'BEGIN {r=0} $2 != 3600 {r=1; print "found TTL " $2} END {exit r}' dig.out.ns3.test$n | cat_i) || ret=1
+awk 'BEGIN {r=0} $2 != 3600 {r=1; print "found TTL " $2} END {exit r}' dig.out.ns3.test$n >awk.out.ns3.test$n || ret=1
+cat_i <awk.out.ns3.test$n
n=$((n + 1))
if [ $ret != 0 ]; then echo_i "failed"; fi
status=$((status + ret))
diff --git a/bin/tests/system/autosign/tests_sh_autosign.py b/bin/tests/system/autosign/tests_sh_autosign.py
index c474b15501..52cf65b438 100644
--- a/bin/tests/system/autosign/tests_sh_autosign.py
+++ b/bin/tests/system/autosign/tests_sh_autosign.py
@@ -17,6 +17,7 @@ pytestmark = pytest.mark.extra_artifacts(
"activate-now-publish-1day.key",
"autoksk.key",
"autozsk.key",
+ "awk.out.*",
"del.key",
"delayksk.key",
"delayzsk.key",