2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-29 13:38:26 +00:00

Test that 'kill -USR1' works

This commit is contained in:
Mark Andrews 2024-06-26 10:53:14 +10:00
parent 88dfe50289
commit 2e55a2ac69

View File

@ -284,7 +284,7 @@ n=$((n + 1))
echo_i "testing 'rndc closelogs' ($n)" echo_i "testing 'rndc closelogs' ($n)"
ret=0 ret=0
test -f ns1/query_log || ret=1 test -f ns1/query_log || ret=1
mv ns1/query_log ns1/query_log.1 || ret=1 mv ns1/query_log ns1/query_log.$n || ret=1
rndccmd 10.53.0.1 closelogs >rndc.out.test$n || ret=1 rndccmd 10.53.0.1 closelogs >rndc.out.test$n || ret=1
$DIG version.bind txt ch @10.53.0.1 -p ${PORT} >dig.out.test$n || ret=1 $DIG version.bind txt ch @10.53.0.1 -p ${PORT} >dig.out.test$n || ret=1
test -f ns1/query_log || ret=1 test -f ns1/query_log || ret=1
@ -293,6 +293,19 @@ test ${lines:-0} -eq 1 || ret=1
if [ "$ret" -ne 0 ]; then echo_i "failed"; fi if [ "$ret" -ne 0 ]; then echo_i "failed"; fi
status=$((status + ret)) status=$((status + ret))
n=$((n + 1))
echo_i "testing 'kill -USR1' ($n)"
ret=0
test -f ns1/query_log || ret=1
mv ns1/query_log ns1/query_log.$n || ret=1
kill -USR1 $(cat ns1/named.pid) || ret=1
$DIG version.bind txt ch @10.53.0.1 -p ${PORT} >dig.out.test$n || ret=1
test -f ns1/query_log || ret=1
lines=$(wc -l <"ns1/query_log")
test ${lines:-0} -eq 1 || ret=1
if [ "$ret" -ne 0 ]; then echo_i "failed"; fi
status=$((status + ret))
n=$((n + 1)) n=$((n + 1))
echo_i "testing default logfile using named -L file ($n)" echo_i "testing default logfile using named -L file ($n)"
ret=0 ret=0