From: Wouter Wijngaards Date: Thu, 30 Apr 2015 10:27:27 +0000 (+0000) Subject: - Unit test for type ANY synthesis. X-Git-Tag: release-1.5.4~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b8eb1713e095fbd7d79ceaa0f3d45f3d0c384e2c;p=thirdparty%2Funbound.git - Unit test for type ANY synthesis. git-svn-id: file:///svn/unbound/trunk@3419 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/doc/Changelog b/doc/Changelog index 0f9b84c40..a7a075299 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,6 @@ +30 April 2015: Wouter + - Unit test for type ANY synthesis. + 22 April 2015: Wouter - Removed contrib/unbound_unixsock.diff, because it has been integrated, use control-interface: /path in unbound.conf. diff --git a/testdata/fwd_any.rpl b/testdata/fwd_any.rpl new file mode 100644 index 000000000..4284ee79e --- /dev/null +++ b/testdata/fwd_any.rpl @@ -0,0 +1,161 @@ +; This is a comment. +; config options go here. +forward-zone: name: "." forward-addr: 216.0.0.1 +CONFIG_END + +SCENARIO_BEGIN Test query and cache with type ANY +RANGE_BEGIN 0 1000 +ENTRY_BEGIN +MATCH opcode qtype qname +ADJUST copy_id +REPLY QR RD RA NOERROR +SECTION QUESTION +www.example.com. IN A +SECTION ANSWER +www.example.com. IN A 10.20.30.40 +SECTION AUTHORITY +www.example.com. IN NS ns.example.com. +SECTION ADDITIONAL +ns.example.com. IN A 10.20.30.50 +ENTRY_END + +ENTRY_BEGIN +MATCH opcode qtype qname +ADJUST copy_id +REPLY QR RD RA NOERROR +SECTION QUESTION +www.example.com. IN ANY +SECTION ANSWER +;; different type in this answer. +www.example.com. IN TXT "text" +ENTRY_END + +ENTRY_BEGIN +MATCH opcode qtype qname +ADJUST copy_id +REPLY QR RD RA NOERROR +SECTION QUESTION +www.example.com. IN AAAA +SECTION ANSWER +www.example.com. IN AAAA ::5 +ENTRY_END + +ENTRY_BEGIN +MATCH opcode qname qtype +ADJUST copy_id +REPLY QR RD RA NOERROR +SECTION QUESTION +www.foo.com. IN ANY +SECTION ANSWER +www.foo.com. IN A 1.2.3.77 +www.foo.com. IN AAAA ::77 +ENTRY_END + +RANGE_END + +STEP 10 QUERY +ENTRY_BEGIN +REPLY RD +SECTION QUESTION +www.example.com. IN A +ENTRY_END +; unneccesary nothing steps. +STEP 20 NOTHING +STEP 30 CHECK_ANSWER +ENTRY_BEGIN +MATCH opcode qname qtype +SECTION QUESTION +www.example.com. IN A +SECTION ANSWER +www.example.com. IN A 10.20.30.40 +ENTRY_END + +; test cache synthesis +STEP 40 QUERY +ENTRY_BEGIN +REPLY RD +SECTION QUESTION +www.example.com. IN ANY +ENTRY_END +STEP 50 NOTHING +STEP 60 CHECK_ANSWER +ENTRY_BEGIN +MATCH opcode qname qtype +SECTION QUESTION +www.example.com. IN ANY +SECTION ANSWER +www.example.com. IN A 10.20.30.40 +ENTRY_END + +; and again +; the synthesized result itself is not added to the cache +STEP 62 QUERY +ENTRY_BEGIN +REPLY RD +SECTION QUESTION +www.example.com. IN ANY +ENTRY_END +STEP 63 NOTHING +STEP 64 CHECK_ANSWER +ENTRY_BEGIN +MATCH opcode qname qtype +SECTION QUESTION +www.example.com. IN ANY +SECTION ANSWER +www.example.com. IN A 10.20.30.40 +ENTRY_END + +; AAAA lookup to add more data in cache +STEP 70 QUERY +ENTRY_BEGIN +REPLY RD +SECTION QUESTION +www.example.com. IN AAAA +ENTRY_END +STEP 80 NOTHING +STEP 90 CHECK_ANSWER +ENTRY_BEGIN +MATCH opcode qname qtype +SECTION QUESTION +www.example.com. IN AAAA +SECTION ANSWER +www.example.com. IN AAAA ::5 +ENTRY_END + +; test cache synthesis of AAAA, and two rrsets. +STEP 100 QUERY +ENTRY_BEGIN +REPLY RD +SECTION QUESTION +www.example.com. IN ANY +ENTRY_END +STEP 110 NOTHING +STEP 120 CHECK_ANSWER +ENTRY_BEGIN +MATCH opcode qname qtype +SECTION QUESTION +www.example.com. IN ANY +SECTION ANSWER +www.example.com. IN A 10.20.30.40 +www.example.com. IN AAAA ::5 +ENTRY_END + +; test query that is not synthesized from cache. +STEP 130 QUERY +ENTRY_BEGIN +REPLY RD +SECTION QUESTION +www.foo.com. IN ANY +ENTRY_END +STEP 140 NOTHING +STEP 150 CHECK_ANSWER +ENTRY_BEGIN +MATCH opcode qname qtype +SECTION QUESTION +www.foo.com. IN ANY +SECTION ANSWER +www.foo.com. IN A 1.2.3.77 +www.foo.com. IN AAAA ::77 +ENTRY_END + +SCENARIO_END