summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-04-12 11:24:51 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:50:02 -0500
commit537e7738928d7ac1c3fe983e87e266d0db5f621e (patch)
tree733a2e3789e81b09dbda67e15a1228b29bd703de /source4/torture
parentcc275f011ea8ca17d270de6946eb54015a4f7055 (diff)
downloadsamba-537e7738928d7ac1c3fe983e87e266d0db5f621e.tar.gz
samba-537e7738928d7ac1c3fe983e87e266d0db5f621e.tar.bz2
samba-537e7738928d7ac1c3fe983e87e266d0db5f621e.zip
r22192: fix compiler warnings
ClearEventLog test is compiled in but disabled now metze (This used to be commit 19fb09970a7bb1c52e616ae9402ea843139a5414)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/rpc/eventlog.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source4/torture/rpc/eventlog.c b/source4/torture/rpc/eventlog.c
index 01a07a680d..ae0283ea99 100644
--- a/source4/torture/rpc/eventlog.c
+++ b/source4/torture/rpc/eventlog.c
@@ -77,7 +77,7 @@ static bool test_GetNumRecords(struct torture_context *tctx, struct dcerpc_pipe
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 @@ static bool test_FlushEventLog(struct torture_context *tctx,
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 @@ struct torture_suite *torture_rpc_eventlog(void)
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);