Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
DNS-Compliance-Testing
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
6
Issues
6
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ISC Open Source Projects
DNS-Compliance-Testing
Commits
b11d47c5
Commit
b11d47c5
authored
Dec 03, 2016
by
Mark Andrews
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sent tests serially
parent
daa63138
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
7 deletions
+38
-7
genreport.c
genreport.c
+38
-7
No files found.
genreport.c
View file @
b11d47c5
...
...
@@ -47,6 +47,7 @@ static int ipv6only = 0;
static
int
debug
=
0
;
static
int
what
=
0
;
static
int
inorder
=
0
;
static
int
serial
=
0
;
static
union
res_sockaddr_union
servers
[
10
];
static
int
nservers
=
0
;
...
...
@@ -196,6 +197,7 @@ struct summary {
char
ns
[
1024
];
/* the server's name */
struct
sockaddr_storage
storage
;
/* server we are talking to */
int
tests
;
/* number of outstanding tests */
int
last
;
/* last test sent */
int
deferred
;
/* was the printing deferred */
int
done
;
/* we are done */
int
type
;
/* recursive query lookup type */
...
...
@@ -251,6 +253,9 @@ static struct {
struct
workitem
*
tail
;
}
work
,
connecting
,
reading
,
ids
[
0x10000
];
static
void
dotest
(
struct
workitem
*
item
);
static
void
nextserver
(
struct
workitem
*
item
);
...
...
@@ -415,6 +420,28 @@ printandfree(struct summary *summary) {
static
void
report
(
struct
summary
*
summary
)
{
/*
* Send the next test now that we have completed the last test.
*/
if
(
serial
&&
summary
->
type
==
0
&&
summary
->
tests
==
1
)
{
unsigned
int
i
=
summary
->
last
+
1
;
for
(;
i
<
sizeof
(
opts
)
/
sizeof
(
opts
[
0
]);
i
++
)
{
struct
workitem
*
item
;
if
(
opts
[
i
].
what
!=
0
&&
(
opts
[
i
].
what
&
what
)
==
0
)
{
summary
->
last
=
i
;
continue
;
}
item
=
calloc
(
1
,
sizeof
(
*
item
));
if
(
item
==
NULL
)
continue
;
item
->
summary
=
summary
;
item
->
summary
->
last
=
item
->
test
=
i
;
dotest
(
item
);
return
;
}
}
/*
* Have all the tests completed?
*/
...
...
@@ -787,8 +814,10 @@ check(char *zone, char *ns, char *address, struct summary *parent) {
break
;
item
->
summary
=
summary
;
item
->
summary
->
tests
++
;
item
->
test
=
i
;
item
->
summary
->
last
=
item
->
test
=
i
;
dotest
(
item
);
if
(
serial
)
break
;
}
report
(
summary
);
/* Release reference. */
}
...
...
@@ -1546,7 +1575,7 @@ connecttoserver(struct workitem *item) {
if
(
fd
>
maxfd
)
maxfd
=
fd
;
gettimeofday
(
&
item
->
when
,
NULL
);
item
->
when
.
tv_sec
+=
6
0
;
item
->
when
.
tv_sec
+=
1
0
;
APPEND
(
connecting
,
item
,
clink
);
return
;
}
...
...
@@ -1763,7 +1792,7 @@ main(int argc, char **argv) {
int
done
=
0
;
char
*
end
;
while
((
n
=
getopt
(
argc
,
argv
,
"46cdfom:
s:
"
))
!=
-
1
)
{
while
((
n
=
getopt
(
argc
,
argv
,
"46cdfom:
r:s
"
))
!=
-
1
)
{
switch
(
n
)
{
case
'4'
:
ipv4only
=
1
;
ipv6only
=
0
;
break
;
case
'6'
:
ipv6only
=
1
;
ipv4only
=
0
;
break
;
...
...
@@ -1775,10 +1804,11 @@ main(int argc, char **argv) {
maxoutstanding
=
n
;
break
;
case
'o'
:
inorder
=
1
;
break
;
case
's'
:
addserver
(
optarg
);
break
;
case
'r'
:
addserver
(
optarg
);
break
;
case
's'
:
serial
=
1
;
break
;
default:
printf
(
"usage: genreport [-4|-6|-c|-d|-f|-o] [-m maxoutstanding] "
"[-
s
server]
\n
"
);
printf
(
"usage: genreport [-4|-6|-c|-d|-f|-o
|-s
] [-m maxoutstanding] "
"[-
r
server]
\n
"
);
printf
(
"
\t
-4: IPv4 servers only
\n
"
);
printf
(
"
\t
-6: IPv6 servers only
\n
"
);
printf
(
"
\t
-c: add common queries
\n
"
);
...
...
@@ -1786,7 +1816,8 @@ main(int argc, char **argv) {
printf
(
"
\t
-f: add full mode tests
\n
"
);
printf
(
"
\t
-m: set maxoutstanding
\n
"
);
printf
(
"
\t
-o: inorder output
\n
"
);
printf
(
"
\t
-s: use specified recursive server
\n
"
);
printf
(
"
\t
-s: serialize tests
\n
"
);
printf
(
"
\t
-r: use specified recursive server
\n
"
);
exit
(
0
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment