From 9e942d23cb76aba2e413d86768bd3d0036ec342e Mon Sep 17 00:00:00 2001 From: Tomas Krizek Date: Mon, 15 Nov 2021 16:01:21 +0100 Subject: [PATCH] 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 --- modules/meson.build | 2 +- .../test.integr/module_serve_stale.rpl | 39 +++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) 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 -- 2.47.2