summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/smbtorture.c5
-rw-r--r--source4/torture/ui.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/source4/torture/smbtorture.c b/source4/torture/smbtorture.c
index 41ee1461d1..cf0340f3b2 100644
--- a/source4/torture/smbtorture.c
+++ b/source4/torture/smbtorture.c
@@ -64,10 +64,13 @@ static bool run_matching(struct torture_context *torture,
for (c = suite->children; c; c = c->next) {
asprintf(&name, "%s-%s", prefix, c->name);
+
if (gen_fnmatch(expr, name) == 0) {
*matched = true;
init_iconv();
+ torture->active_testname = talloc_strdup(torture, prefix);
ret &= torture_run_suite(torture, c);
+ talloc_free(torture);
free(name);
continue;
}
@@ -82,7 +85,9 @@ static bool run_matching(struct torture_context *torture,
if (gen_fnmatch(expr, name) == 0) {
*matched = true;
init_iconv();
+ torture->active_testname = talloc_strdup(torture, prefix);
ret &= torture_run_tcase(torture, t);
+ talloc_free(torture->active_testname);
}
free(name);
}
diff --git a/source4/torture/ui.c b/source4/torture/ui.c
index 441e9ebbd7..84524ef990 100644
--- a/source4/torture/ui.c
+++ b/source4/torture/ui.c
@@ -135,7 +135,7 @@ BOOL torture_run_suite(struct torture_context *context,
context->ui_ops->suite_start(context, suite);
old_testname = context->active_testname;
- if (context->active_testname)
+ if (old_testname != NULL)
context->active_testname = talloc_asprintf(context, "%s-%s",
old_testname, suite->name);
else