2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

manage interaction of default -a behavior with the

-t and -n options and allow multiple -t and -n options
This commit is contained in:
William King
1999-10-27 00:46:57 +00:00
parent 7b87e35d02
commit 339d7df653

View File

@@ -95,9 +95,11 @@ main(int argc, char **argv)
pid_t deadpid; pid_t deadpid;
int status; int status;
int len; int len;
int first;
testspec_t *pts; testspec_t *pts;
struct sigaction sa; struct sigaction sa;
first = 1;
subprocs = 1; subprocs = 1;
T_timeout = T_TIMEOUT; T_timeout = T_TIMEOUT;
@@ -116,6 +118,15 @@ main(int argc, char **argv)
else if (c == 't') { else if (c == 't') {
tnum = atoi(isc_commandline_argument); tnum = atoi(isc_commandline_argument);
if ((tnum > 0) && (tnum < T_MAXTESTS)) { if ((tnum > 0) && (tnum < T_MAXTESTS)) {
if (first) {
/*
* turn off effect of -a default
* and allow multiple -t and -n
* options
*/
memset(T_tvec, 0, sizeof(T_tvec));
first = 0;
}
/* flag test tnum to be run */ /* flag test tnum to be run */
tnum -= 1; tnum -= 1;
T_tvec[tnum / 8] |= (0x01 << (tnum % 8)); T_tvec[tnum / 8] |= (0x01 << (tnum % 8));
@@ -133,6 +144,10 @@ main(int argc, char **argv)
while (pts->pfv != NULL) { while (pts->pfv != NULL) {
if (! strcmp(pts->func_name, if (! strcmp(pts->func_name,
isc_commandline_argument)) { isc_commandline_argument)) {
if (first) {
memset(T_tvec, 0, sizeof(T_tvec));
first = 0;
}
T_tvec[tnum/8] |= (0x01 << (tnum%8)); T_tvec[tnum/8] |= (0x01 << (tnum%8));
break; break;
} }