diff options
Diffstat (limited to 'source4/torture/rpc/eventlog.c')
-rw-r--r-- | source4/torture/rpc/eventlog.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/source4/torture/rpc/eventlog.c b/source4/torture/rpc/eventlog.c index 1c72625f73..c1d863454c 100644 --- a/source4/torture/rpc/eventlog.c +++ b/source4/torture/rpc/eventlog.c @@ -125,7 +125,7 @@ static bool test_ReadEventLog(struct torture_context *tctx, /* Now read the actual record */ r.in.number_of_bytes = *r.out.real_size; - r.out.data = talloc_size(tctx, r.in.number_of_bytes); + r.out.data = talloc_array(tctx, uint8_t, r.in.number_of_bytes); status = dcerpc_eventlog_ReadEventLogW(p, tctx, &r); @@ -192,10 +192,6 @@ static bool test_ClearEventLog(struct torture_context *tctx, 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; @@ -233,17 +229,20 @@ static bool test_OpenEventLog(struct torture_context *tctx, return true; } -struct torture_suite *torture_rpc_eventlog(void) +struct torture_suite *torture_rpc_eventlog(TALLOC_CTX *mem_ctx) { struct torture_suite *suite; struct torture_rpc_tcase *tcase; + struct torture_test *test; - suite = torture_suite_create(talloc_autofree_context(), "EVENTLOG"); + suite = torture_suite_create(mem_ctx, "EVENTLOG"); tcase = torture_suite_add_rpc_iface_tcase(suite, "eventlog", &ndr_table_eventlog); torture_rpc_tcase_add_test(tcase, "OpenEventLog", test_OpenEventLog); - torture_rpc_tcase_add_test(tcase, "ClearEventLog", test_ClearEventLog); + test = torture_rpc_tcase_add_test(tcase, "ClearEventLog", + test_ClearEventLog); + test->dangerous = true; 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); |