mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-08-17 21:25:50 +02:00
transfer task cleans the chunk list. Also fix the auth_transfer_limit test to use a forwarder for each type of failure, so the one is not blocked by the other waiting.
55 lines
1.6 KiB
Plaintext
55 lines
1.6 KiB
Plaintext
# #-- auth_transfer_limit.pre--#
|
|
# source the master var file when it's there
|
|
[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
|
|
# use .tpkg.var.test for in test variable passing
|
|
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
|
|
|
PRE="../.."
|
|
. ../common.sh
|
|
if grep -e "define HAVE_PTHREAD 1" -e "define HAVE_SOLARIS_THREADS 1" -e "define HAVE_WINDOWS_THREADS 1" $PRE/config.h; then
|
|
TEST_FAST_RELOAD="yes"
|
|
else
|
|
TEST_FAST_RELOAD="no"
|
|
fi
|
|
echo "TEST_FAST_RELOAD=$TEST_FAST_RELOAD" >> .tpkg.var.test
|
|
|
|
get_random_port 3
|
|
UNBOUND_PORT=$RND_PORT
|
|
FWD_PORT=$(($RND_PORT + 1))
|
|
FWD2_PORT=$(($RND_PORT + 2))
|
|
echo "UNBOUND_PORT=$UNBOUND_PORT" >> .tpkg.var.test
|
|
echo "FWD_PORT=$FWD_PORT" >> .tpkg.var.test
|
|
echo "FWD2_PORT=$FWD2_PORT" >> .tpkg.var.test
|
|
|
|
# start forwarders
|
|
get_ldns_testns
|
|
$LDNS_TESTNS -p $FWD_PORT auth_transfer_limit.testns >fwd.log 2>&1 &
|
|
FWD_PID=$!
|
|
echo "FWD_PID=$FWD_PID" >> .tpkg.var.test
|
|
|
|
$LDNS_TESTNS -p $FWD2_PORT auth_transfer_limit.testns2 >fwd2.log 2>&1 &
|
|
FWD2_PID=$!
|
|
echo "FWD2_PID=$FWD2_PID" >> .tpkg.var.test
|
|
|
|
# make config file
|
|
CONTROL_PATH=/tmp
|
|
CONTROL_PID=$$
|
|
sed -e 's/@PORT\@/'$UNBOUND_PORT'/' \
|
|
-e 's/@TOPORT\@/'$FWD_PORT'/' \
|
|
-e 's/@TOPORT2\@/'$FWD2_PORT'/' \
|
|
-e 's?@CONTROL_PATH\@?'$CONTROL_PATH'?' \
|
|
-e 's/@CONTROL_PID@/'$CONTROL_PID'/' \
|
|
< auth_transfer_limit.conf > ub.conf
|
|
# start unbound in the background
|
|
$PRE/unbound -d -c ub.conf >unbound.log 2>&1 &
|
|
UNBOUND_PID=$!
|
|
echo "UNBOUND_PID=$UNBOUND_PID" >> .tpkg.var.test
|
|
echo "CONTROL_PATH=$CONTROL_PATH" >> .tpkg.var.test
|
|
echo "CONTROL_PID=$CONTROL_PID" >> .tpkg.var.test
|
|
|
|
cat .tpkg.var.test
|
|
wait_ldns_testns_up fwd.log
|
|
wait_ldns_testns_up fwd2.log
|
|
wait_unbound_up unbound.log
|
|
|