summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2006-11-02 22:17:11 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:24:45 -0500
commitd8cd73563e3e1cdb7cf23833ac97c596289a27b3 (patch)
tree3f1c0dd7f46caadf70d11702ccd8a8ab10a0f564 /source4/torture
parent5028a9266d7d7354db30930f39788001af5dc1d6 (diff)
downloadsamba-d8cd73563e3e1cdb7cf23833ac97c596289a27b3.tar.gz
samba-d8cd73563e3e1cdb7cf23833ac97c596289a27b3.tar.bz2
samba-d8cd73563e3e1cdb7cf23833ac97c596289a27b3.zip
r19537: Report correct test names when tests failed.
(This used to be commit 7b93b3c8be3d2a253b0737be893e7eb1b7c94dba)
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