summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-03-23 16:30:05 +0100
committerGünther Deschner <gd@samba.org>2010-03-23 16:57:30 +0100
commit3e04bf4fbce09ff2538e1c83f904a0b3fe9a755c (patch)
tree8e21cab4f7b123478d00c7ae2dccedc9ba1f8f8b /source4/torture
parentbebb17ad0e8a9508bf6b083c4f709001fc6998c5 (diff)
downloadsamba-3e04bf4fbce09ff2538e1c83f904a0b3fe9a755c.tar.gz
samba-3e04bf4fbce09ff2538e1c83f904a0b3fe9a755c.tar.bz2
samba-3e04bf4fbce09ff2538e1c83f904a0b3fe9a755c.zip
s4-smbtorture: use torture_context in libnet domain tests as well.
Guenther
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/libnet/domain.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/source4/torture/libnet/domain.c b/source4/torture/libnet/domain.c
index 7e8a2d0b3a..8c880be7fc 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;
}