xref: /netbsd-src/external/bsd/unbound/dist/testdata/fwd_jostle_out.rpl (revision 2dd295436a0082eb4f8d294f4aa73c223413d0f2)
1; config options go here.
2; This is one forever, one jostle.
3server:
4	num-queries-per-thread: 2
5forward-zone:
6	name: "."
7	forward-addr: 216.0.0.1
8CONFIG_END
9SCENARIO_BEGIN Test too many queries asked, last one jostled out to make space
10
11; fill the forever slot.
12STEP 1 QUERY
13ENTRY_BEGIN
14REPLY RD
15SECTION QUESTION
16www.example.com. IN A
17ENTRY_END
18
19STEP 2 CHECK_OUT_QUERY
20ENTRY_BEGIN
21MATCH qname qtype opcode
22SECTION QUESTION
23www.example.com. IN A
24ENTRY_END
25
26; NO REPLY (this step is not needed)
27STEP 3 NOTHING
28
29;something enters the jostle slot.
30STEP 4 QUERY
31ENTRY_BEGIN
32REPLY RD
33SECTION QUESTION
34www.example.net. IN A
35ENTRY_END
36
37STEP 5 CHECK_OUT_QUERY
38ENTRY_BEGIN
39MATCH qname qtype opcode
40SECTION QUESTION
41www.example.net. IN A
42ENTRY_END
43
44; 300 msec passes
45STEP 6 TIME_PASSES ELAPSE 0.300
46
47; something else tries to replace the entry in the jostle slot.
48; and it works because the entry is now too old.
49STEP 8 QUERY
50ENTRY_BEGIN
51REPLY RD
52SECTION QUESTION
53www.example.org. IN A
54ENTRY_END
55
56; reply from latest query returns
57STEP 9 REPLY
58ENTRY_BEGIN
59	MATCH opcode qtype qname
60	ADJUST copy_id
61	REPLY QR RD RA NOERROR
62	SECTION QUESTION
63www.example.org. IN A
64	SECTION ANSWER
65www.example.org. IN A 10.20.30.42
66	SECTION AUTHORITY
67www.example.org. IN NS ns.example.org.
68	SECTION ADDITIONAL
69ns.example.org. IN A 10.20.30.50
70ENTRY_END
71
72; answer to last query
73STEP 10 CHECK_ANSWER
74ENTRY_BEGIN
75MATCH opcode qname qtype
76SECTION QUESTION
77www.example.org. IN A
78SECTION ANSWER
79www.example.org. IN A 10.20.30.42
80ENTRY_END
81
82
83; reply from first query returns
84STEP 11 REPLY
85ENTRY_BEGIN
86	MATCH opcode qtype qname
87	ADJUST copy_id
88	REPLY QR RD RA NOERROR
89	SECTION QUESTION
90www.example.com. IN A
91	SECTION ANSWER
92www.example.com. IN A 10.20.30.40
93	SECTION AUTHORITY
94www.example.com. IN NS ns.example.com.
95	SECTION ADDITIONAL
96ns.example.com. IN A 10.20.30.50
97ENTRY_END
98
99; answer to first query
100STEP 12 CHECK_ANSWER
101ENTRY_BEGIN
102MATCH opcode qname qtype
103SECTION QUESTION
104www.example.com. IN A
105SECTION ANSWER
106www.example.com. IN A 10.20.30.40
107ENTRY_END
108
109SCENARIO_END
110
111; testbound checks before exit:
112;  * no more pending queries outstanding.
113;  * and no answers that have not been checked.
114