From 709c51868fd7dfb99d3e06cdb9be846b63c020dc Mon Sep 17 00:00:00 2001 From: Pieter Lexis Date: Fri, 30 Sep 2016 13:21:01 +0200 Subject: [PATCH] Add tests for #4483 --- .../cache-recursorcache-forward/command | 4 ++++ .../cache-recursorcache-forward/description | 2 ++ .../cache-recursorcache-forward/expected_result | 6 ++++++ regression-tests.recursor/config.sh | 10 +++++++++- 4 files changed, 21 insertions(+), 1 deletion(-) create mode 100755 regression-tests.recursor/cache-recursorcache-forward/command create mode 100644 regression-tests.recursor/cache-recursorcache-forward/description create mode 100644 regression-tests.recursor/cache-recursorcache-forward/expected_result diff --git a/regression-tests.recursor/cache-recursorcache-forward/command b/regression-tests.recursor/cache-recursorcache-forward/command new file mode 100755 index 000000000..62b635eff --- /dev/null +++ b/regression-tests.recursor/cache-recursorcache-forward/command @@ -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 index 000000000..9f1ebe49e --- /dev/null +++ b/regression-tests.recursor/cache-recursorcache-forward/description @@ -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 index 000000000..702663ffd --- /dev/null +++ b/regression-tests.recursor/cache-recursorcache-forward/expected_result @@ -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 diff --git a/regression-tests.recursor/config.sh b/regression-tests.recursor/config.sh index c8cd305a2..6cacd0149 100755 --- a/regression-tests.recursor/config.sh +++ b/regression-tests.recursor/config.sh @@ -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 <