summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2003-12-30 15:20:07 +0000
committerVolker Lendecke <vlendec@samba.org>2003-12-30 15:20:07 +0000
commit1159b55c25fd7855491ea59576bfb8f8dc5c42e8 (patch)
treef79fbbe1e92cb1e27ececb2fd51da494bd1ed16c
parent889eb5ef5df9a50df09b04076efbc8d58bc3665e (diff)
downloadsamba-1159b55c25fd7855491ea59576bfb8f8dc5c42e8.tar.gz
samba-1159b55c25fd7855491ea59576bfb8f8dc5c42e8.tar.bz2
samba-1159b55c25fd7855491ea59576bfb8f8dc5c42e8.zip
Fix Bug # 924
Volker (This used to be commit 1f0e045502f802f819738d1b89574b07dfaa6bc6)
-rw-r--r--source3/torture/torture.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index d20c48d645..1fd73cb253 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -4577,12 +4577,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++) {
@@ -4590,6 +4592,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);
@@ -4609,6 +4612,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;
}
@@ -4776,10 +4785,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;
}