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

metze at samba.org metze at samba.org
Thu Apr 12 11:24:53 GMT 2007


Author: metze
Date: 2007-04-12 11:24:51 +0000 (Thu, 12 Apr 2007)
New Revision: 22192

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

Log:
fix compiler warnings

ClearEventLog test is compiled in but disabled now

metze
Modified:
   branches/SAMBA_4_0/source/torture/rpc/eventlog.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/rpc/eventlog.c
===================================================================
--- branches/SAMBA_4_0/source/torture/rpc/eventlog.c	2007-04-12 11:23:58 UTC (rev 22191)
+++ branches/SAMBA_4_0/source/torture/rpc/eventlog.c	2007-04-12 11:24:51 UTC (rev 22192)
@@ -77,7 +77,7 @@
 			dcerpc_eventlog_GetNumRecords(p, tctx, &r), 
 			"GetNumRecords failed");
 
-	torture_comment(tctx, talloc_asprintf(tctx, "%d records\n", *r.out.number));
+	torture_comment(tctx, "%d records\n", *r.out.number);
 
 	cr.in.handle = cr.out.handle = &handle;
 
@@ -186,12 +186,17 @@
 	return true;
 }
 
-static bool test_ClearEventLog(struct dcerpc_pipe *p, TALLOC_CTX *tctx)
+static bool test_ClearEventLog(struct torture_context *tctx, 
+			       struct dcerpc_pipe *p)
 {
 	struct eventlog_ClearEventLogW r;
 	struct eventlog_CloseEventLog cr;
 	struct policy_handle handle;
 
+	if (!torture_setting_bool(tctx, "dangerous", false)) {
+		torture_skip(tctx, "ClearEventLog test disabled - enable dangerous tests to use");
+	}
+
 	if (!get_policy_handle(tctx, p, &handle))
 		return false;
 
@@ -236,15 +241,10 @@
 
 	suite = torture_suite_create(talloc_autofree_context(), "EVENTLOG");
 	tcase = torture_suite_add_rpc_iface_tcase(suite, "eventlog", 
-											  &dcerpc_table_eventlog);
+						  &dcerpc_table_eventlog);
 
 	torture_rpc_tcase_add_test(tcase, "OpenEventLog", test_OpenEventLog);
-
-#if 0
-	/* Destructive test */
 	torture_rpc_tcase_add_test(tcase, "ClearEventLog", test_ClearEventLog);
-#endif
-	
 	torture_rpc_tcase_add_test(tcase, "GetNumRecords", test_GetNumRecords);
 	torture_rpc_tcase_add_test(tcase, "ReadEventLog", test_ReadEventLog);
 	torture_rpc_tcase_add_test(tcase, "FlushEventLog", test_FlushEventLog);



More information about the samba-cvs mailing list