From 365cfb1c323cd3a24ff0caf1929674910095b4c6 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 9 Dec 2010 16:57:45 +0100 Subject: smbtorture: Rename --list to --list-suites, add stub --list. --- source4/torture/shell.c | 2 +- source4/torture/smbtorture.c | 21 +++++++++++---------- source4/torture/smbtorture.h | 2 +- 3 files changed, 13 insertions(+), 12 deletions(-) (limited to 'source4/torture') diff --git a/source4/torture/shell.c b/source4/torture/shell.c index 4c098a9748..d6cc94c665 100644 --- a/source4/torture/shell.c +++ b/source4/torture/shell.c @@ -215,7 +215,7 @@ static void shell_list(const struct shell_command * command, return; } - torture_print_tests(true); + torture_print_testsuites(true); } static void shell_auth(const struct shell_command * command, diff --git a/source4/torture/smbtorture.c b/source4/torture/smbtorture.c index 36b8c0f377..dec97d22f6 100644 --- a/source4/torture/smbtorture.c +++ b/source4/torture/smbtorture.c @@ -190,7 +190,7 @@ static void parse_dns(struct loadparm_context *lp_ctx, const char *dns) /* Print the full test list, formatted into separate labelled test * groups. */ -static void print_structured_test_list(void) +static void print_structured_testsuite_list(void) { struct torture_suite *o; struct torture_suite *s; @@ -228,7 +228,7 @@ static void print_structured_test_list(void) printf("\nThe default test is ALL.\n"); } -static void print_test_list(void) +static void print_testsuite_list(void) { struct torture_suite *o; struct torture_suite *s; @@ -248,12 +248,12 @@ static void print_test_list(void) } } -void torture_print_tests(bool structured) +void torture_print_testsuites(bool structured) { if (structured) { - print_structured_test_list(); + print_structured_testsuite_list(); } else { - print_test_list(); + print_testsuite_list(); } } @@ -311,7 +311,7 @@ _NORETURN_ static void usage(poptContext pc) printf("Tests are:"); - print_structured_test_list(); + print_structured_testsuite_list(); exit(1); } @@ -406,7 +406,7 @@ int main(int argc,char *argv[]) const char *basedir = NULL; char *outputdir; const char *extra_module = NULL; - static int list_tests = 0; + static int list_tests = 0, list_testsuites = 0; int num_extra_users = 0; char **restricted = NULL; int num_restricted = -1; @@ -425,7 +425,8 @@ int main(int argc,char *argv[]) {"num-ops", 0, POPT_ARG_INT, &torture_numops, 0, "num ops", NULL}, {"entries", 0, POPT_ARG_INT, &torture_entries, 0, "entries", NULL}, {"loadfile", 0, POPT_ARG_STRING, NULL, OPT_LOADFILE, "NBench load file to use", NULL}, - {"list", 0, POPT_ARG_NONE, &list_tests, 0, "List available tests and exit", NULL }, + {"list-suites", 0, POPT_ARG_NONE, &list_testsuites, 0, "List available testsuites and exit", NULL }, + {"list", 0, POPT_ARG_NONE, &list_tests, 0, "List available tests in specified suites and exit", NULL }, {"unclist", 0, POPT_ARG_STRING, NULL, OPT_UNCLIST, "unclist", NULL}, {"timelimit", 't', POPT_ARG_INT, NULL, OPT_TIMELIMIT, "Set time limit (in seconds)", NULL}, {"failures", 'f', POPT_ARG_INT, &torture_failures, 0, "failures", NULL}, @@ -588,8 +589,8 @@ int main(int argc,char *argv[]) torture_init(); } - if (list_tests) { - print_test_list(); + if (list_testsuites) { + print_testsuite_list(); return 0; } diff --git a/source4/torture/smbtorture.h b/source4/torture/smbtorture.h index 8ad58bf71c..cbb48234e3 100644 --- a/source4/torture/smbtorture.h +++ b/source4/torture/smbtorture.h @@ -37,7 +37,7 @@ struct torture_test; int torture_init(void); bool torture_register_suite(struct torture_suite *suite); void torture_shell(struct torture_context *tctx); -void torture_print_tests(bool structured); +void torture_print_testsuites(bool structured); bool torture_run_named_tests(struct torture_context *torture, const char *name, const char **restricted); bool torture_parse_target(struct loadparm_context *lp_ctx, const char *target); -- cgit