tests need forwarding mode enabled.

git-svn-id: file:///svn/unbound/trunk@337 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2007-05-24 13:41:30 +00:00
parent 4a2c15be58
commit fa44214c61
14 changed files with 20 additions and 6 deletions

View file

@ -196,8 +196,8 @@ worker_process_query(struct worker* worker, struct work_query* w,
}
/* request done */
if(s == module_error) {
qstate_free(worker, qstate);
replyerror(LDNS_RCODE_SERVFAIL, w);
qstate_free(worker, qstate);
return;
}
if(s == module_finished) {

View file

@ -3,6 +3,7 @@
- iterator forwarder feature separated out.
- iterator hints stub code, config file stub code, so that first
testing can proceed locally.
- replay tests now have config option to enable forwarding mode.
23 May 2007: Wouter
- outside network does precise timers for roundtrip estimates for rtt

View file

@ -117,10 +117,11 @@ struct delegpt* hints_lookup_root(struct iter_hints* hints, uint16_t qclass);
* for this qname/qclass, determine if this combination indicates that a
* stub hint exists and must be primed.
*
* @param qname The qname that generated the delegation point.
* @param qclass The qclass that generated the delegation point.
* @param dp The cache generated delegation point.
* @return A priming delegation point if there is a stub hint that must
* @param hints: hint storage.
* @param qname: The qname that generated the delegation point.
* @param qclass: The qclass that generated the delegation point.
* @param dp: The cache generated delegation point.
* @return: A priming delegation point if there is a stub hint that must
* be primed, otherwise null.
*/
struct delegpt* hints_lookup_stub(struct iter_hints* hints,

View file

@ -201,7 +201,7 @@ perform_forward(struct module_qstate* qstate, enum module_ev event, int id,
qstate->ext_state[id] = module_error;
return;
}
log_err("bad event for iterator");
log_err("bad event for iterator[forwarding]");
qstate->ext_state[id] = module_error;
}
@ -222,6 +222,8 @@ iter_operate(struct module_qstate* qstate, enum module_ev event, int id,
perform_forward(qstate, event, id, outbound);
return;
}
log_err("bad event for iterator");
qstate->ext_state[id] = module_error;
}
/** iterator cleanup query state */

1
testdata/fwd.rpl vendored
View file

@ -1,5 +1,6 @@
; This is a comment.
; config options go here.
server: forward-to: "127.0.0.1"
CONFIG_END
SCENARIO_BEGIN Sample of a valid query

View file

@ -1,5 +1,6 @@
; This is a comment.
; config options go here.
server: forward-to: "127.0.0.1"
CONFIG_END
SCENARIO_BEGIN Query receives answer from the cache

View file

@ -1,4 +1,5 @@
; config options go here.
server: forward-to: "127.0.0.1"
CONFIG_END
SCENARIO_BEGIN Forwarder and an error happens on server query.
STEP 1 QUERY

View file

@ -4,6 +4,7 @@
server:
msg-cache-size: 1 # one whole byte!
msg-cache-slabs: 1
forward-to: "127.0.0.1"
CONFIG_END
SCENARIO_BEGIN Old answer is dropped from the cache

View file

@ -5,6 +5,7 @@
; here config file options:
server:
msg-cache-size: 1024
forward-to: "127.0.0.1"
CONFIG_END
SCENARIO_BEGIN Query receives answer not from the cache

View file

@ -1,4 +1,5 @@
; config options go here.
server: forward-to: "127.0.0.1"
CONFIG_END
SCENARIO_BEGIN Forwarder and a timeout happens on server query.
STEP 1 QUERY

View file

@ -1,6 +1,7 @@
; config options go here.
server:
num-queries-per-thread: 1
forward-to: "127.0.0.1"
CONFIG_END
SCENARIO_BEGIN Sample of a valid query

View file

@ -1,5 +1,6 @@
; This is a comment.
; config options go here.
server: forward-to: "127.0.0.1"
CONFIG_END
SCENARIO_BEGIN RRset TTL is updated from message.

View file

@ -1,5 +1,6 @@
; This is a comment.
; config options go here.
server: forward-to: "127.0.0.1"
CONFIG_END
SCENARIO_BEGIN Untrusted rrset not used for update

View file

@ -1,5 +1,6 @@
; This is a comment.
; config options go here.
server: forward-to: "127.0.0.1"
CONFIG_END
SCENARIO_BEGIN RRset is updated from other message that passes by.