From: Tomas Krizek Date: Mon, 15 Nov 2021 15:01:21 +0000 (+0100) Subject: serve_stale: add test with NS timeout X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fmerge-requests%2F1227%2Fhead;p=thirdparty%2Fknot-resolver.git serve_stale: add test with NS timeout Modify the test to simulate a non-responsive auth as well. As of v5.4.2, this test should fail, because serve_stale doesn't work with the current server selection algorithm. Related #687 --- diff --git a/modules/meson.build b/modules/meson.build index b2e68a6eb..6c7366cf2 100644 --- a/modules/meson.build +++ b/modules/meson.build @@ -29,7 +29,7 @@ config_tests += [ integr_tests += [ ['rebinding', meson.current_source_dir() / 'rebinding' / 'test.integr'], - ['serve_stale', meson.current_source_dir() / 'serve_stale' / 'test.integr'], + ['serve_stale', meson.current_source_dir() / 'serve_stale' / 'test.integr', [], true], ] diff --git a/modules/serve_stale/test.integr/module_serve_stale.rpl b/modules/serve_stale/test.integr/module_serve_stale.rpl index 3ab3a8475..f64af8666 100644 --- a/modules/serve_stale/test.integr/module_serve_stale.rpl +++ b/modules/serve_stale/test.integr/module_serve_stale.rpl @@ -208,6 +208,23 @@ SECTION ADDITIONAL ENTRY_END RANGE_END +; K.ROOT-SERVERS.NET. +; do_not_answer any queries +RANGE_BEGIN 201 300 + ADDRESS 193.0.14.129 + ADDRESS 192.5.6.30 + ADDRESS 1.2.3.4 +ENTRY_BEGIN +MATCH opcode subdomain +ADJUST copy_id copy_query do_not_answer +REPLY QR SERVFAIL +SECTION QUESTION +. IN A +SECTION AUTHORITY +SECTION ADDITIONAL +ENTRY_END +RANGE_END + STEP 1 QUERY ENTRY_BEGIN REPLY RD @@ -277,4 +294,26 @@ www.example.com. IN A 10.20.30.40 ;ns.example.com. IN A 1.2.3.4 ENTRY_END +STEP 210 QUERY +ENTRY_BEGIN +REPLY RD +SECTION QUESTION +www.example.com. IN A +ENTRY_END + +; Must be resolved from expired cache by serve_stale module +STEP 220 CHECK_ANSWER +ENTRY_BEGIN +MATCH all +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 +;example.com. IN NS ns.example.com. +;SECTION ADDITIONAL +;ns.example.com. IN A 1.2.3.4 +ENTRY_END + SCENARIO_END