summaryrefslogtreecommitdiff
path: root/source4/torture/rpc
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2006-06-16 22:06:09 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:09:09 -0500
commit582d46ec42144bddccddacadd52a0256f58cb453 (patch)
tree0545454b21f1ef986117f7c2e72fe957d2b662e2 /source4/torture/rpc
parentcc9d70bbba4e326ba89dec8cdc58b64b89f33091 (diff)
downloadsamba-582d46ec42144bddccddacadd52a0256f58cb453.tar.gz
samba-582d46ec42144bddccddacadd52a0256f58cb453.tar.bz2
samba-582d46ec42144bddccddacadd52a0256f58cb453.zip
r16304: Improve testing UI API. This now allows registering the full
test suite tree, looks a bit more like other unit testing API's, fixes some memory responsibility issues, introduces testcases, and removes the need for tests to call torture_ok(). (This used to be commit 0445b1a56a02552f895f400960b9ced39244a144)
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r--source4/torture/rpc/samr.c36
1 files changed, 9 insertions, 27 deletions
diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c
index 6e21ff595f..57e50009b4 100644
--- a/source4/torture/rpc/samr.c
+++ b/source4/torture/rpc/samr.c
@@ -3368,45 +3368,27 @@ static BOOL test_Connect(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
BOOL torture_rpc_samr(struct torture_context *torture)
{
- NTSTATUS status;
- struct dcerpc_pipe *p;
- TALLOC_CTX *mem_ctx;
+ NTSTATUS status;
+ struct dcerpc_pipe *p;
BOOL ret = True;
struct policy_handle handle;
- mem_ctx = talloc_init("torture_rpc_samr");
-
- status = torture_rpc_connection(mem_ctx, &p, &dcerpc_table_samr);
+ status = torture_rpc_connection(torture, &p, &dcerpc_table_samr);
if (!NT_STATUS_IS_OK(status)) {
- talloc_free(mem_ctx);
return False;
}
- if (!test_Connect(p, mem_ctx, &handle)) {
- ret = False;
- }
+ ret &= test_Connect(p, torture, &handle);
- if (!test_QuerySecurity(p, mem_ctx, &handle)) {
- ret = False;
- }
-
- if (!test_EnumDomains(p, mem_ctx, &handle)) {
- ret = False;
- }
+ ret &= test_QuerySecurity(p, torture, &handle);
- if (!test_SetDsrmPassword(p, mem_ctx, &handle)) {
- ret = False;
- }
+ ret &= test_EnumDomains(p, torture, &handle);
- if (!test_Shutdown(p, mem_ctx, &handle)) {
- ret = False;
- }
+ ret &= test_SetDsrmPassword(p, torture, &handle);
- if (!test_samr_handle_Close(p, mem_ctx, &handle)) {
- ret = False;
- }
+ ret &= test_Shutdown(p, torture, &handle);
- talloc_free(mem_ctx);
+ ret &= test_samr_handle_Close(p, torture, &handle);
return ret;
}