update system tests to confirm new log messages

(cherry picked from commit 000720fe14)
This commit is contained in:
JINMEI Tatuya
2024-09-26 17:04:57 +09:00
committed by Mark Andrews
parent 7d1de99656
commit 318fcc4c35
5 changed files with 41 additions and 0 deletions

View File

@@ -183,6 +183,11 @@ $DIG $DIGOPTS @10.53.0.1 nil. TXT | grep 'AXFR on too many records' >/dev/null |
if [ $ret != 0 ]; then echo_i "failed"; fi
status=$((status + ret))
msg="error adding 'nil/TXT' in 'nil/IN' (zone): too many records (must not exceed 5)"
wait_for_log 10 "$msg" ns1/named.run || ret=1
if [ $ret != 0 ]; then echo_i "failed"; fi
status=$((status + ret))
n=$((n + 1))
echo_i "testing AXFR fallback after IXFR failure (bad SOA owner) ($n)"
ret=0

View File

@@ -315,6 +315,14 @@ n=$((n + 1))
[ $ret -eq 0 ] || echo_i "failed"
status=$((status + ret))
# Check that the corresponding log message about exceeding the limit is present.
msg="error adding '2100-txt.over-limit/TXT' in 'over-limit/IN' (zone): too many records (must not exceed 2050)"
wait_for_log 10 "$msg" ns1/named.run || ret=1
if [ $ret != 0 ]; then echo_i "failed"; fi
status=$((status + ret))
# Prepare for any further checking of the logs later on.
nextpart ns1/named.run >/dev/null
echo_i "checking that kasp-max-records-per-type rdatasets loaded ($n)"
for _attempt in 0 1 2 3 4 5 6 7 8 9; do
ret=0

View File

@@ -77,6 +77,7 @@ zone "max-ttl.nil" {
check-integrity no;
allow-update { named-acl; };
allow-transfer { any; };
max-records-per-type 3;
};
zone "other.nil" {

View File

@@ -1206,6 +1206,27 @@ if [ $ret -ne 0 ]; then
status=1
fi
n=$((n + 1))
echo_i "check adding more records than max-records-per-type fails ($n)"
ret=0
$NSUPDATE <<END >nsupdate.out.test$n 2>&1 && ret=1
server 10.53.0.1 ${PORT}
zone max-ttl.nil.
update add a.max-ttl.nil. 60 IN A 192.0.2.1
update add a.max-ttl.nil. 60 IN A 192.0.2.2
update add a.max-ttl.nil. 60 IN A 192.0.2.3
update add a.max-ttl.nil. 60 IN A 192.0.2.4
send
END
grep "update failed: SERVFAIL" nsupdate.out.test$n >/dev/null || ret=1
msg="error updating 'a.max-ttl.nil/A' in 'max-ttl.nil/IN' (zone): too many records (must not exceed 3)"
wait_for_log 10 "$msg" ns1/named.run || ret=1
[ $ret = 0 ] || {
echo_i "failed"
status=1
}
nextpart ns1/named.run >/dev/null
n=$((n + 1))
ret=0
echo_i "add a record which is truncated when logged. ($n)"

View File

@@ -233,6 +233,12 @@ echo_i "checking RRset that exceeds max-records-per-type ($n)"
ret=0
dig_with_opts @10.53.0.3 biganswer.big >dig.out.1.test$n || ret=1
grep 'status: SERVFAIL' dig.out.1.test$n >/dev/null || ret=1
msg="error adding 'biganswer.big/A' in './IN' (cache): too many records (must not exceed 100)"
wait_for_log 10 "$msg" ns3/named.run || ret=1
if [ $ret != 0 ]; then echo_i "failed"; fi
status=$((status + ret))
ns3_reset ns3/named5.conf.in
dig_with_opts @10.53.0.3 biganswer.big >dig.out.2.test$n || ret=1
grep 'status: NOERROR' dig.out.2.test$n >/dev/null || ret=1