summaryrefslogtreecommitdiff
path: root/source4/torture/smbtorture.c
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/smbtorture.c
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/smbtorture.c')
-rw-r--r--source4/torture/smbtorture.c5
1 files changed, 5 insertions, 0 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);
}