mirror of
https://github.com/samba-team/samba.git
synced 2025-03-09 08:58:35 +03:00
Fix Bug # 924
Volker
This commit is contained in:
parent
7a3a5a6361
commit
3663ed2b96
@ -4581,12 +4581,14 @@ static BOOL run_test(const char *name)
|
||||
{
|
||||
BOOL ret = True;
|
||||
BOOL result = True;
|
||||
BOOL found = False;
|
||||
int i;
|
||||
double t;
|
||||
if (strequal(name,"ALL")) {
|
||||
for (i=0;torture_ops[i].name;i++) {
|
||||
run_test(torture_ops[i].name);
|
||||
}
|
||||
found = True;
|
||||
}
|
||||
|
||||
for (i=0;torture_ops[i].name;i++) {
|
||||
@ -4594,6 +4596,7 @@ static BOOL run_test(const char *name)
|
||||
(unsigned)random());
|
||||
|
||||
if (strequal(name, torture_ops[i].name)) {
|
||||
found = True;
|
||||
printf("Running %s\n", name);
|
||||
if (torture_ops[i].flags & FLAG_MULTIPROC) {
|
||||
t = create_procs(torture_ops[i].fn, &result);
|
||||
@ -4613,6 +4616,12 @@ static BOOL run_test(const char *name)
|
||||
printf("%s took %g secs\n\n", name, t);
|
||||
}
|
||||
}
|
||||
|
||||
if (!found) {
|
||||
printf("Did not find a test named %s\n", name);
|
||||
ret = False;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -4780,10 +4789,10 @@ static void usage(void)
|
||||
printf("host=%s share=%s user=%s myname=%s\n",
|
||||
host, share, username, myname);
|
||||
|
||||
if (argc == 1) {
|
||||
if (argc == optind) {
|
||||
correct = run_test("ALL");
|
||||
} else {
|
||||
for (i=1;i<argc;i++) {
|
||||
for (i=optind;i<argc;i++) {
|
||||
if (!run_test(argv[i])) {
|
||||
correct = False;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user