From b23b90a7ccee2ca24b3e13b738e1f371e3c56b43 Mon Sep 17 00:00:00 2001 From: Kees Monshouwer Date: Mon, 18 Feb 2013 22:02:24 +0100 Subject: [PATCH] Metadata update is now in the same transaction as the AXFR. Add sqlite3-presigned tests to the regression test suite. --- pdns/slavecommunicator.cc | 2 +- regression-tests/start-test-stop | 33 ++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/pdns/slavecommunicator.cc b/pdns/slavecommunicator.cc index b754076000..fd92f4934f 100644 --- a/pdns/slavecommunicator.cc +++ b/pdns/slavecommunicator.cc @@ -76,7 +76,7 @@ void CommunicatorClass::suck(const string &domain,const string &remote) UeberBackend *B=dynamic_cast(P.getBackend()); // copy of the same UeberBackend NSEC3PARAMRecordContent ns3pr, hadNs3pr; bool narrow, hadNarrow=false; - DNSSECKeeper dk; // has its own ueberbackend + DNSSECKeeper dk (B); // reuse our backend for DNSSECKeeper bool dnssecZone = false; bool haveNSEC3=false; if(dk.isSecuredZone(domain)) { diff --git a/regression-tests/start-test-stop b/regression-tests/start-test-stop index af74ec6113..a63c37c855 100755 --- a/regression-tests/start-test-stop +++ b/regression-tests/start-test-stop @@ -558,6 +558,39 @@ then break fi done + elif [ ${context:0:8} = gsqlite3 ] + then + rm -f pdns.sqlite31 + sqlite3 pdns.sqlite31 < ../pdns/no-dnssec.schema.sqlite3.sql + sqlite3 pdns.sqlite31 < ../pdns/dnssec.schema.sqlite3.sql + + for zone in $(grep zone named.conf | cut -f2 -d\" | tac) + do + sqlite3 pdns.sqlite31 "INSERT INTO domains (name, type, master) VALUES('$zone','SLAVE','127.0.0.1:$port');" + done + + port=$((port+100)) + + $RUNWRAPPER ../pdns/pdns_server --daemon=no --local-port=$port --socket-dir=./ \ + --no-shuffle --launch=gsqlite3 --gsqlite3-dnssec \ + --fancy-records --send-root-referral \ + --cache-ttl=0 --query-cache-ttl=0 --no-config --slave --retrieval-threads=1 \ + --gsqlite3-database=pdns.sqlite31 --gsqlite3-pragma-synchronous=0 |& egrep -v "update records set ordername|insert into records" & + echo 'waiting for zones to be slaved' + set +e + while sleep 10 + do + todo=$(sqlite3 pdns.sqlite31 'SELECT COUNT(id) FROM domains WHERE last_check IS NULL') + if [ $? -eq 0 ] + then + if [ $todo = 0 ] + then + break + fi + fi + done + set -e + sqlite3 pdns.sqlite31 ANALYZE; elif [ ${context:0:4} = bind ] then context=${context}-presigned -- 2.47.2