[SCM] Samba Shared Repository - branch master updated
Günther Deschner
gd at samba.org
Tue Mar 23 09:57:30 MDT 2010
The branch, master has been updated
via 3e04bf4... s4-smbtorture: use torture_context in libnet domain tests as well.
from bebb17a... s4:WINREG torture - fix an error (missing "break" in a "switch")
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 3e04bf4fbce09ff2538e1c83f904a0b3fe9a755c
Author: Günther Deschner <gd at samba.org>
Date: Tue Mar 23 16:30:05 2010 +0100
s4-smbtorture: use torture_context in libnet domain tests as well.
Guenther
-----------------------------------------------------------------------
Summary of changes:
source4/torture/libnet/domain.c | 18 ++++++++++--------
1 files changed, 10 insertions(+), 8 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source4/torture/libnet/domain.c b/source4/torture/libnet/domain.c
index 7e8a2d0..8c880be 100644
--- a/source4/torture/libnet/domain.c
+++ b/source4/torture/libnet/domain.c
@@ -24,21 +24,22 @@
#include "librpc/gen_ndr/ndr_samr_c.h"
#include "param/param.h"
-static bool test_domainopen(struct libnet_context *net_ctx, TALLOC_CTX *mem_ctx,
+static bool test_domainopen(struct torture_context *tctx,
+ struct libnet_context *net_ctx, TALLOC_CTX *mem_ctx,
struct lsa_String *domname,
struct policy_handle *domain_handle)
{
NTSTATUS status;
struct libnet_DomainOpen io;
- printf("opening domain\n");
+ torture_comment(tctx, "opening domain\n");
io.in.domain_name = talloc_strdup(mem_ctx, domname->string);
io.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
status = libnet_DomainOpen(net_ctx, mem_ctx, &io);
if (!NT_STATUS_IS_OK(status)) {
- printf("Composite domain open failed - %s\n", nt_errstr(status));
+ torture_comment(tctx, "Composite domain open failed - %s\n", nt_errstr(status));
return false;
}
@@ -47,7 +48,8 @@ static bool test_domainopen(struct libnet_context *net_ctx, TALLOC_CTX *mem_ctx,
}
-static bool test_cleanup(struct dcerpc_binding_handle *b, TALLOC_CTX *mem_ctx,
+static bool test_cleanup(struct torture_context *tctx,
+ struct dcerpc_binding_handle *b, TALLOC_CTX *mem_ctx,
struct policy_handle *domain_handle)
{
NTSTATUS status;
@@ -57,11 +59,11 @@ static bool test_cleanup(struct dcerpc_binding_handle *b, TALLOC_CTX *mem_ctx,
r.in.handle = domain_handle;
r.out.handle = &handle;
- printf("closing domain handle\n");
+ torture_comment(tctx, "closing domain handle\n");
status = dcerpc_samr_Close_r(b, mem_ctx, &r);
if (!NT_STATUS_IS_OK(status)) {
- printf("Close failed - %s\n", nt_errstr(status));
+ torture_comment(tctx, "Close failed - %s\n", nt_errstr(status));
return false;
}
@@ -95,12 +97,12 @@ bool torture_domainopen(struct torture_context *torture)
/*
* Testing synchronous version
*/
- if (!test_domainopen(net_ctx, mem_ctx, &name, &h)) {
+ if (!test_domainopen(torture, net_ctx, mem_ctx, &name, &h)) {
ret = false;
goto done;
}
- if (!test_cleanup(net_ctx->samr.pipe->binding_handle, mem_ctx, &h)) {
+ if (!test_cleanup(torture, net_ctx->samr.pipe->binding_handle, mem_ctx, &h)) {
ret = false;
goto done;
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list