Commit 0727cdbb authored by Mark Andrews's avatar Mark Andrews

Merge branch...

Merge branch '5-opcode-opcodeflg-tests-report-timeout-when-server-does-not-copy-opcode' into 'master'

Resolve "opcode/opcodeflg tests report timeout when server does not copy opcode"

Closes #5

See merge request !3
parents 5c207eef 109b4f38
Pipeline #1245 passed with stages
in 1 minute and 21 seconds
......@@ -1126,6 +1126,22 @@ check(char *zone, char *ns, char *address, struct summary *parent) {
report(summary); /* Release reference. */
}
static char *
opcodetext(int code) {
static char buf[64];
switch(code) {
case ns_o_query: return("query");
case ns_o_iquery: return("iquery");
case ns_o_status: return("status");
case ns_o_notify: return("notify");
case ns_o_update: return("update");
default:
snprintf(buf, sizeof(buf), "opcode%u", code);
return (buf);
}
}
static char *
rcodetext(int code) {
static char buf[64];
......@@ -1728,6 +1744,9 @@ process(struct workitem *item, unsigned char *buf, int buflen) {
if (rcode != ns_r_servfail && opts[item->test].version == 0)
item->summary->allservfail = 0;
if (opts[item->test].opcode != opcode)
addtag(item, opcodetext(opcode)), ok = 0;
if (opts[item->test].version == 0) {
/* Expect NOERROR / BADCOOKIE */
if (opts[item->test].opcode == 0 &&
......@@ -2508,7 +2527,7 @@ udpread(int fd) {
if (!qr)
return;
id = buf[0] << 8| buf[1];
id = buf[0] << 8 | buf[1];
item = HEAD(ids[id]);
while (item != NULL &&
!storage_equal(&storage, &item->summary->storage))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment