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