diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2010-09-21 20:16:40 -0700 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2010-09-21 22:54:34 -0700 |
commit | 0aff42a6e4bd4330c50566a13ecf684486f8e96d (patch) | |
tree | b20fea93dd862b58e289af4e9bf8abb4ba6b4f07 | |
parent | ea1ed67d15b0b2d70fff638c3c5c79de66312e9c (diff) | |
download | samba-0aff42a6e4bd4330c50566a13ecf684486f8e96d.tar.gz samba-0aff42a6e4bd4330c50566a13ecf684486f8e96d.tar.bz2 samba-0aff42a6e4bd4330c50566a13ecf684486f8e96d.zip |
torture: Remove active_testname variable.
-rw-r--r-- | lib/torture/torture.c | 20 | ||||
-rw-r--r-- | lib/torture/torture.h | 3 | ||||
-rw-r--r-- | source4/torture/smbtorture.c | 3 |
3 files changed, 1 insertions, 25 deletions
diff --git a/lib/torture/torture.c b/lib/torture/torture.c index c27aacc1c5..d6f893eb0f 100644 --- a/lib/torture/torture.c +++ b/lib/torture/torture.c @@ -285,12 +285,6 @@ bool torture_run_suite_restricted(struct torture_context *context, /* FIXME: Adjust torture_suite_children_count if restricted != NULL */ context->results->ui_ops->progress(context, torture_suite_children_count(suite), TORTURE_PROGRESS_SET); - old_testname = context->active_testname; - if (old_testname != NULL) - context->active_testname = talloc_asprintf(context, "%s-%s", - old_testname, suite->name); - else - context->active_testname = talloc_strdup(context, suite->name); for (tcase = suite->testcases; tcase; tcase = tcase->next) { ret &= torture_run_tcase_restricted(context, tcase, restricted); @@ -302,9 +296,6 @@ bool torture_run_suite_restricted(struct torture_context *context, context->results->ui_ops->progress(context, 0, TORTURE_PROGRESS_POP); } - talloc_free(context->active_testname); - context->active_testname = old_testname; - if (context->results->ui_ops->suite_finish) context->results->ui_ops->suite_finish(context, suite); @@ -353,8 +344,6 @@ static bool internal_torture_run_test(struct torture_context *context, char *subunit_testname = NULL; if (tcase == NULL || strcmp(test->name, tcase->name) != 0) { - old_testname = context->active_testname; - context->active_testname = talloc_asprintf(context, "%s-%s", old_testname, test->name); subunit_testname = talloc_asprintf(context, "%s.%s", tcase->name, test->name); } else { subunit_testname = test->name; @@ -405,10 +394,6 @@ static bool internal_torture_run_test(struct torture_context *context, talloc_free(context->last_reason); - if (tcase == NULL || strcmp(test->name, tcase->name) != 0) { - talloc_free(context->active_testname); - context->active_testname = old_testname; - } context->active_test = NULL; context->active_tcase = NULL; @@ -450,9 +435,6 @@ bool torture_run_tcase_restricted(struct torture_context *context, } } - old_testname = context->active_testname; - context->active_testname = talloc_asprintf(context, "%s-%s", - old_testname, tcase->name); for (test = tcase->tests; test; test = test->next) { if (setup_succeeded) { ret &= internal_torture_run_test(context, tcase, test, @@ -464,8 +446,6 @@ bool torture_run_tcase_restricted(struct torture_context *context, torture_ui_test_result(context, TORTURE_FAIL, setup_reason); } } - talloc_free(context->active_testname); - context->active_testname = old_testname; if (setup_succeeded && tcase->fixture_persistent && tcase->teardown && !tcase->teardown(context, tcase->data)) { diff --git a/lib/torture/torture.h b/lib/torture/torture.h index 78df076723..90513b723d 100644 --- a/lib/torture/torture.h +++ b/lib/torture/torture.h @@ -84,7 +84,6 @@ struct torture_context { struct torture_results *results; - char *active_testname; struct torture_test *active_test; struct torture_tcase *active_tcase; @@ -93,7 +92,7 @@ struct torture_context /** Directory used for temporary test data */ const char *outputdir; - + /** Event context */ struct tevent_context *ev; diff --git a/source4/torture/smbtorture.c b/source4/torture/smbtorture.c index c03d734318..0f2ca2fcbe 100644 --- a/source4/torture/smbtorture.c +++ b/source4/torture/smbtorture.c @@ -58,7 +58,6 @@ static bool run_matching(struct torture_context *torture, if (gen_fnmatch(expr, name) == 0) { *matched = true; reload_charcnv(torture->lp_ctx); - torture->active_testname = name; if (restricted != NULL) ret &= torture_run_suite_restricted(torture, o, restricted); else @@ -72,7 +71,6 @@ static bool run_matching(struct torture_context *torture, if (gen_fnmatch(expr, name) == 0) { *matched = true; reload_charcnv(torture->lp_ctx); - torture->active_testname = name; ret &= torture_run_tcase_restricted(torture, t, restricted); } for (p = t->tests; p; p = p->next) { @@ -80,7 +78,6 @@ static bool run_matching(struct torture_context *torture, if (gen_fnmatch(expr, name) == 0) { *matched = true; reload_charcnv(torture->lp_ctx); - torture->active_testname = name; ret &= torture_run_test_restricted(torture, t, p, restricted); } } |