1# #-- fast_reload_thread.test --# 2# source the master var file when it's there 3[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master 4# use .tpkg.var.test for in test variable passing 5[ -f .tpkg.var.test ] && source .tpkg.var.test 6 7PRE="../.." 8. ../common.sh 9 10echo "> unbound-control status" 11$PRE/unbound-control -c ub.conf status 12if test $? -ne 0; then 13 echo "wrong exit value." 14 exit 1 15else 16 echo "exit value: OK" 17fi 18 19echo "> unbound-control fast_reload" 20$PRE/unbound-control -c ub.conf fast_reload 2>&1 | tee output 21if test $? -ne 0; then 22 echo "wrong exit value." 23 exit 1 24else 25 echo "exit value: OK" 26fi 27wait_logfile unbound.log "start fast reload thread" 60 28wait_logfile unbound.log "stop fast reload thread" 60 29wait_logfile unbound.log "joined with fastreload thread" 60 30 31if grep "ok" output; then 32 echo "OK" 33else 34 echo "output not correct" 35 exit 1 36fi 37 38exit 0 39