diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2006-06-17 01:20:02 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:09:11 -0500 |
commit | 835d8ed2f61fff798ac49156df94b86ace704b6d (patch) | |
tree | b37e2109cf691273f4a50ca3e54c436e7a7c20af /source4 | |
parent | a3545383fb3ef5ded73a392b19586461448c0042 (diff) | |
download | samba-835d8ed2f61fff798ac49156df94b86ace704b6d.tar.gz samba-835d8ed2f61fff798ac49156df94b86ace704b6d.tar.bz2 samba-835d8ed2f61fff798ac49156df94b86ace704b6d.zip |
r16332: Fix two small bugs found by the buildfarm.
(This used to be commit 3decb34bb607b83f72deaa4baca935f4f253e2f2)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/torture/local/util_strlist.c | 2 | ||||
-rw-r--r-- | source4/torture/ui.c | 12 |
2 files changed, 8 insertions, 6 deletions
diff --git a/source4/torture/local/util_strlist.c b/source4/torture/local/util_strlist.c index 29886df995..65f8bc914a 100644 --- a/source4/torture/local/util_strlist.c +++ b/source4/torture/local/util_strlist.c @@ -68,7 +68,7 @@ static BOOL test_lists_shell(struct torture_context *test, const void *_data) struct torture_suite *torture_local_util_strlist(TALLOC_CTX *mem_ctx) { - struct torture_suite *suite = torture_suite_create(mem_ctx, "util_strlist"); + struct torture_suite *suite = torture_suite_create(mem_ctx, "LOCAL-STRLIST"); int i; for (i = 0; test_lists_shell_strings[i]; i++) { diff --git a/source4/torture/ui.c b/source4/torture/ui.c index 1878058a72..aca6934c90 100644 --- a/source4/torture/ui.c +++ b/source4/torture/ui.c @@ -137,6 +137,7 @@ BOOL torture_run_suite(struct torture_context *context, static BOOL internal_torture_run_test(struct torture_context *context, struct torture_tcase *tcase, struct torture_test *test, + BOOL already_setup, const void *tcase_data) { BOOL ret; @@ -148,7 +149,7 @@ static BOOL internal_torture_run_test(struct torture_context *context, return True; } - if (!tcase_data && tcase->setup && !tcase->setup(context, &data)) + if (!already_setup && tcase->setup && !tcase->setup(context, &data)) return False; context->active_tcase = tcase; @@ -160,7 +161,7 @@ static BOOL internal_torture_run_test(struct torture_context *context, context->last_reason = NULL; context->last_result = TORTURE_OK; - ret = test->run(context, tcase->setup?data:tcase->data, test->data); + ret = test->run(context, !already_setup?data:tcase_data, test->data); if (context->ui_ops->test_result) context->ui_ops->test_result(context, context->last_result, @@ -179,7 +180,7 @@ static BOOL internal_torture_run_test(struct torture_context *context, context->active_test = NULL; context->active_tcase = NULL; - if (!tcase_data && tcase->teardown && !tcase->teardown(context, data)) + if (!already_setup && tcase->teardown && !tcase->teardown(context, data)) return False; return ret; @@ -204,7 +205,8 @@ BOOL torture_run_tcase(struct torture_context *context, for (test = tcase->tests; test; test = test->next) { ret &= internal_torture_run_test(context, tcase, test, - (tcase->setup?data:tcase->data)); + tcase->fixture_persistent, + (tcase->setup?data:tcase->data)); } if (tcase->fixture_persistent && tcase->teardown && @@ -224,7 +226,7 @@ BOOL torture_run_test(struct torture_context *context, struct torture_tcase *tcase, struct torture_test *test) { - return internal_torture_run_test(context, tcase, test, NULL); + return internal_torture_run_test(context, tcase, test, False, NULL); } const char *torture_setting(struct torture_context *test, const char *name, |