summaryrefslogtreecommitdiff
path: root/source4/torture/rpc
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-08-31 15:43:03 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:03:18 -0500
commitd05d5da1e8cfd64f2c5b1c0ee1b2c71bb65ae441 (patch)
tree8313a843e2cc80f1924a9c7377e55387303dfbab /source4/torture/rpc
parent9e35f00c63462c7e43ade2d3b770b6247b083a46 (diff)
downloadsamba-d05d5da1e8cfd64f2c5b1c0ee1b2c71bb65ae441.tar.gz
samba-d05d5da1e8cfd64f2c5b1c0ee1b2c71bb65ae441.tar.bz2
samba-d05d5da1e8cfd64f2c5b1c0ee1b2c71bb65ae441.zip
r24846: Use metadata about dangerous tests.
(This used to be commit f914b828ff486d41e123e6dafa1c8fd76b34b44b)
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r--source4/torture/rpc/eventlog.c9
-rw-r--r--source4/torture/rpc/initshutdown.c19
-rw-r--r--source4/torture/rpc/srvsvc.c10
-rw-r--r--source4/torture/rpc/winreg.c25
4 files changed, 25 insertions, 38 deletions
diff --git a/source4/torture/rpc/eventlog.c b/source4/torture/rpc/eventlog.c
index 1c72625f73..99208eb7ea 100644
--- a/source4/torture/rpc/eventlog.c
+++ b/source4/torture/rpc/eventlog.c
@@ -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;
@@ -237,13 +233,16 @@ struct torture_suite *torture_rpc_eventlog(void)
{
struct torture_suite *suite;
struct torture_rpc_tcase *tcase;
+ struct torture_test *test;
suite = torture_suite_create(talloc_autofree_context(), "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);
diff --git a/source4/torture/rpc/initshutdown.c b/source4/torture/rpc/initshutdown.c
index 77b86ea3a1..9f6f1735ee 100644
--- a/source4/torture/rpc/initshutdown.c
+++ b/source4/torture/rpc/initshutdown.c
@@ -51,16 +51,12 @@ static bool test_Abort(struct torture_context *tctx,
}
static bool test_Init(struct torture_context *tctx,
- struct dcerpc_pipe *p)
+ struct dcerpc_pipe *p)
{
struct initshutdown_Init r;
NTSTATUS status;
uint16_t hostname = 0x0;
- if (!torture_setting_bool(tctx, "dangerous", false))
- torture_skip(tctx,
- "initshutdown tests disabled - enable dangerous tests to use");
-
r.in.hostname = &hostname;
r.in.message = talloc(tctx, struct initshutdown_String);
init_initshutdown_String(tctx, r.in.message, "spottyfood");
@@ -83,10 +79,6 @@ static bool test_InitEx(struct torture_context *tctx,
NTSTATUS status;
uint16_t hostname = 0x0;
- if (!torture_setting_bool(tctx, "dangerous", false))
- torture_skip(tctx,
- "initshutdown tests disabled - enable dangerous tests to use");
-
r.in.hostname = &hostname;
r.in.message = talloc(tctx, struct initshutdown_String);
init_initshutdown_String(tctx, r.in.message, "spottyfood");
@@ -109,12 +101,15 @@ struct torture_suite *torture_rpc_initshutdown(TALLOC_CTX *mem_ctx)
{
struct torture_suite *suite = torture_suite_create(mem_ctx, "INITSHUTDOWN");
struct torture_rpc_tcase *tcase;
+ struct torture_test *test;
tcase = torture_suite_add_rpc_iface_tcase(suite, "initshutdown",
- &ndr_table_initshutdown);
+ &ndr_table_initshutdown);
- torture_rpc_tcase_add_test(tcase, "Init", test_Init);
- torture_rpc_tcase_add_test(tcase, "InitEx", test_InitEx);
+ test = torture_rpc_tcase_add_test(tcase, "Init", test_Init);
+ test->dangerous = true;
+ test = torture_rpc_tcase_add_test(tcase, "InitEx", test_InitEx);
+ test->dangerous = true;
return suite;
}
diff --git a/source4/torture/rpc/srvsvc.c b/source4/torture/rpc/srvsvc.c
index a51dc96876..30763f896c 100644
--- a/source4/torture/rpc/srvsvc.c
+++ b/source4/torture/rpc/srvsvc.c
@@ -538,10 +538,6 @@ static bool test_NetShareAddSetDel(struct torture_context *tctx,
int i;
BOOL ret = True;
- if (!torture_setting_bool(tctx, "dangerous", false))
- torture_skip(tctx,
- "NetShareAddSetDel disabled - enable dangerous tests to use\n");
-
a.in.server_unc = r.in.server_unc = q.in.server_unc = d.in.server_unc =
talloc_asprintf(tctx, "\\\\%s", dcerpc_server_name(p));
r.in.share_name = talloc_strdup(tctx, "testshare");
@@ -1132,6 +1128,7 @@ struct torture_suite *torture_rpc_srvsvc(TALLOC_CTX *mem_ctx)
{
struct torture_suite *suite = torture_suite_create(mem_ctx, "SRVSVC");
struct torture_rpc_tcase *tcase;
+ struct torture_test *test;
tcase = torture_suite_add_rpc_iface_tcase(suite, "srvsvc (admin access)", &ndr_table_srvsvc);
@@ -1147,8 +1144,9 @@ struct torture_suite *torture_rpc_srvsvc(TALLOC_CTX *mem_ctx)
torture_rpc_tcase_add_test(tcase, "NetRemoteTOD", test_NetRemoteTOD);
torture_rpc_tcase_add_test(tcase, "NetShareEnum", test_NetShareEnumFull);
torture_rpc_tcase_add_test(tcase, "NetShareGetInfo", test_NetShareGetInfoAdminFull);
- torture_rpc_tcase_add_test(tcase, "NetShareAddSetDel",
- test_NetShareAddSetDel);
+ test = torture_rpc_tcase_add_test(tcase, "NetShareAddSetDel",
+ test_NetShareAddSetDel);
+ test->dangerous = true;
torture_rpc_tcase_add_test(tcase, "NetNameValidate", test_NetNameValidate);
tcase = torture_suite_add_anon_rpc_iface_tcase(suite,
diff --git a/source4/torture/rpc/winreg.c b/source4/torture/rpc/winreg.c
index a3d671c489..fac9f0f8d8 100644
--- a/source4/torture/rpc/winreg.c
+++ b/source4/torture/rpc/winreg.c
@@ -523,16 +523,12 @@ static bool test_AbortSystemShutdown(struct dcerpc_pipe *p,
return true;
}
-static bool test_InitiateSystemShutdown(struct torture_context *tctx,
- struct dcerpc_pipe *p)
+static bool test_InitiateSystemShutdown(struct torture_context *tctx,
+ struct dcerpc_pipe *p)
{
struct winreg_InitiateSystemShutdown r;
uint16_t hostname = 0x0;
- if (!torture_setting_bool(tctx, "dangerous", false))
- torture_skip(tctx,
- "winreg_InitiateShutdown disabled - enable dangerous tests to use");
-
r.in.hostname = &hostname;
r.in.message = talloc(tctx, struct initshutdown_String);
init_initshutdown_String(tctx, r.in.message, "spottyfood");
@@ -556,10 +552,6 @@ static bool test_InitiateSystemShutdownEx(struct torture_context *tctx,
struct winreg_InitiateSystemShutdownEx r;
uint16_t hostname = 0x0;
- if (!torture_setting_bool(tctx, "dangerous", false))
- torture_skip(tctx,
- "winreg_InitiateShutdownEx disabled - enable dangerous tests to use");
-
r.in.hostname = &hostname;
r.in.message = talloc(tctx, struct initshutdown_String);
init_initshutdown_String(tctx, r.in.message, "spottyfood");
@@ -749,15 +741,18 @@ struct torture_suite *torture_rpc_winreg(TALLOC_CTX *mem_ctx)
int i;
struct torture_rpc_tcase *tcase;
struct torture_suite *suite = torture_suite_create(mem_ctx, "WINREG");
+ struct torture_test *test;
tcase = torture_suite_add_rpc_iface_tcase(suite, "winreg",
- &ndr_table_winreg);
+ &ndr_table_winreg);
- torture_rpc_tcase_add_test(tcase, "InitiateSystemShutdown",
- test_InitiateSystemShutdown);
+ test = torture_rpc_tcase_add_test(tcase, "InitiateSystemShutdown",
+ test_InitiateSystemShutdown);
+ test->dangerous = true;
- torture_rpc_tcase_add_test(tcase, "InitiateSystemShutdownEx",
- test_InitiateSystemShutdownEx);
+ test = torture_rpc_tcase_add_test(tcase, "InitiateSystemShutdownEx",
+ test_InitiateSystemShutdownEx);
+ test->dangerous = true;
for (i = 0; i < ARRAY_SIZE(open_fns); i++) {
torture_rpc_tcase_add_test_ex(tcase, open_fns[i].name, test_Open,