]> granicus.if.org Git - pdns/commitdiff
Add tests for #4483
authorPieter Lexis <pieter.lexis@powerdns.com>
Fri, 30 Sep 2016 11:21:01 +0000 (13:21 +0200)
committerPieter Lexis <pieter.lexis@powerdns.com>
Fri, 30 Sep 2016 11:21:01 +0000 (13:21 +0200)
regression-tests.recursor/cache-recursorcache-forward/command [new file with mode: 0755]
regression-tests.recursor/cache-recursorcache-forward/description [new file with mode: 0644]
regression-tests.recursor/cache-recursorcache-forward/expected_result [new file with mode: 0644]
regression-tests.recursor/config.sh

diff --git a/regression-tests.recursor/cache-recursorcache-forward/command b/regression-tests.recursor/cache-recursorcache-forward/command
new file mode 100755 (executable)
index 0000000..62b635e
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/bash
+$SDIG $nameserver 5302 www.arthur.example.net a recurse
+sleep 3
+$SDIG $nameserver 5302 www.arthur.example.net a recurse
diff --git a/regression-tests.recursor/cache-recursorcache-forward/description b/regression-tests.recursor/cache-recursorcache-forward/description
new file mode 100644 (file)
index 0000000..9f1ebe4
--- /dev/null
@@ -0,0 +1,2 @@
+#4483 -- Check if we properly cache answers that lie below a forwarded zone, where
+we've gotten a referral from said forwarded zone to a lower zone.
diff --git a/regression-tests.recursor/cache-recursorcache-forward/expected_result b/regression-tests.recursor/cache-recursorcache-forward/expected_result
new file mode 100644 (file)
index 0000000..702663f
--- /dev/null
@@ -0,0 +1,6 @@
+Reply to question for qname='www.arthur.example.net.', qtype=A
+Rcode: 0 (No Error), RD: 1, QR: 1, TC: 0, AA: 0, opcode: 0
+0      www.arthur.example.net. IN      A       15      192.0.2.2
+Reply to question for qname='www.arthur.example.net.', qtype=A
+Rcode: 0 (No Error), RD: 1, QR: 1, TC: 0, AA: 0, opcode: 0
+0      www.arthur.example.net. IN      A       12      192.0.2.2
index c8cd305a2d45244b76a02056bce10b7dd10a4c36..6cacd01492ddd8c77c03980d4e7ab565f7947b44 100755 (executable)
@@ -45,7 +45,7 @@ fi
 
 cd configs
 
-for dir in recursor-service recursor-service2 recursor-service3; do
+for dir in recursor-service recursor-service2 recursor-service3 recursor-service4; do
   mkdir -p /tmp/$dir
   mkdir -p $dir
   cd $dir
@@ -609,3 +609,11 @@ function preresolve(dq)
   return false
 end
 EOF
+
+cat > recursor-service4/recursor.conf <<EOF
+local-port=5302
+socket-dir=/tmp/recursor-service4
+packetcache-ttl=0
+forward-zones=net.=$PREFIX.10;$PREFIX.11
+
+EOF