svn commit: samba r19537 - in branches/SAMBA_4_0/source/torture: .

jelmer at samba.org jelmer at samba.org
Thu Nov 2 22:17:16 GMT 2006


Author: jelmer
Date: 2006-11-02 22:17:11 +0000 (Thu, 02 Nov 2006)
New Revision: 19537

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=19537

Log:
Report correct test names when tests failed.

Modified:
   branches/SAMBA_4_0/source/torture/smbtorture.c
   branches/SAMBA_4_0/source/torture/ui.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/smbtorture.c
===================================================================
--- branches/SAMBA_4_0/source/torture/smbtorture.c	2006-11-02 22:02:37 UTC (rev 19536)
+++ branches/SAMBA_4_0/source/torture/smbtorture.c	2006-11-02 22:17:11 UTC (rev 19537)
@@ -64,10 +64,13 @@
 
 		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 @@
 			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);
 		}

Modified: branches/SAMBA_4_0/source/torture/ui.c
===================================================================
--- branches/SAMBA_4_0/source/torture/ui.c	2006-11-02 22:02:37 UTC (rev 19536)
+++ branches/SAMBA_4_0/source/torture/ui.c	2006-11-02 22:17:11 UTC (rev 19537)
@@ -135,7 +135,7 @@
 		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



More information about the samba-cvs mailing list