diff options
author | Volker Lendecke <vlendec@samba.org> | 2003-12-30 15:18:25 +0000 |
---|---|---|
committer | Volker Lendecke <vlendec@samba.org> | 2003-12-30 15:18:25 +0000 |
commit | a0f8007da59932bcdbff9261a3fa30e803c41557 (patch) | |
tree | 2655b9b8cc7c86fe9f4c077ac597e7af0821a2f6 | |
parent | 829188b34fd46644ea65316943a0d61ce717b8e9 (diff) | |
download | samba-a0f8007da59932bcdbff9261a3fa30e803c41557.tar.gz samba-a0f8007da59932bcdbff9261a3fa30e803c41557.tar.bz2 samba-a0f8007da59932bcdbff9261a3fa30e803c41557.zip |
Fix Bug # 924
Volker
(This used to be commit 3663ed2b964cc306cfe6b4060b51d991405e720d)
-rw-r--r-- | source3/torture/torture.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/source3/torture/torture.c b/source3/torture/torture.c index 1708f334f3..2e6bc49d55 100644 --- a/source3/torture/torture.c +++ b/source3/torture/torture.c @@ -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; } |