Tests update.

git-svn-id: file:///svn/unbound/trunk@693 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2007-10-18 09:24:57 +00:00
parent 268ada0d33
commit c41d12bb94
5 changed files with 21 additions and 4 deletions

View file

@ -796,6 +796,9 @@ void
worker_sighandler(int sig, void* arg)
{
/* note that log, print, syscalls here give race conditions. */
/* we still print DETAIL logs, because this is extensive per message
* logging anyway, and the operator may then have an interest
* in the cause for unbound to exit */
struct worker* worker = (struct worker*)arg;
switch(sig) {
case SIGHUP:

View file

@ -1,5 +1,8 @@
18 October 2007: Wouter
- addresses are logged with errors.
- fixup testcode fake event to remove pending before callback
since the callback may create new pending items.
- tests updated because retries are now in iterator module.
17 October 2007: Wouter
- fixup another cycle detect and ns-addr timeout resolution bug.

View file

@ -380,6 +380,9 @@ fake_pending_callback(struct replay_runtime* runtime,
struct fake_pending* p = runtime->pending_list;
struct comm_reply repinfo;
struct comm_point c;
void* cb_arg = p->cb_arg;
comm_point_callback_t* cb = p->callback;
memset(&c, 0, sizeof(c));
if(!p) fatal_exit("No pending queries.");
log_assert(todo->qname == NULL); /* or find that one */
@ -393,12 +396,12 @@ fake_pending_callback(struct replay_runtime* runtime,
repinfo.c = &c;
repinfo.addrlen = p->addrlen;
memcpy(&repinfo.addr, &p->addr, p->addrlen);
if((*p->callback)(&c, p->cb_arg, error, &repinfo)) {
pending_list_delete(runtime, p);
if((*cb)(&c, cb_arg, error, &repinfo)) {
fatal_exit("unexpected: pending callback returned 1");
}
/* delete the pending item. */
ldns_buffer_free(c.buffer);
pending_list_delete(runtime, p);
}
/**

View file

@ -8,9 +8,13 @@ SECTION QUESTION
www.example.com. IN A
ENTRY_END
; But the pending query fails due to error (say TCP failure or malloc or ...)
; This is iterator/iterator.h OUTBOUND_MSG_RETRY number of errors.
STEP 2 ERROR
STEP 3 ERROR
STEP 4 ERROR
STEP 5 ERROR
; returns servfail
STEP 4 CHECK_ANSWER
STEP 14 CHECK_ANSWER
ENTRY_BEGIN
MATCH opcode qname qtype
SECTION QUESTION

View file

@ -8,9 +8,13 @@ SECTION QUESTION
www.example.com. IN A
ENTRY_END
; But the pending query times out!
; OUTBOUND_MSG_RETRY times timeout.
STEP 2 TIMEOUT
STEP 3 TIMEOUT
STEP 4 TIMEOUT
STEP 5 TIMEOUT
; returns servfail
STEP 4 CHECK_ANSWER
STEP 14 CHECK_ANSWER
ENTRY_BEGIN
MATCH opcode qname qtype
SECTION QUESTION