summaryrefslogtreecommitdiff
path: root/source4/torture/libnet
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-09-02 14:09:24 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:03:31 -0500
commitab055fb990e36be37a39a1d3a59788720e7e31e4 (patch)
tree7504e5b0cc5faaf24ae01b656ec10b6a15b9a778 /source4/torture/libnet
parentf1e576cb1232bd855a7645bce40c0afc86900cba (diff)
downloadsamba-ab055fb990e36be37a39a1d3a59788720e7e31e4.tar.gz
samba-ab055fb990e36be37a39a1d3a59788720e7e31e4.tar.bz2
samba-ab055fb990e36be37a39a1d3a59788720e7e31e4.zip
r24894: Run the libnet tests over just one DCE/RPC transport. Other DCE/RPC tests already check
that the DCE/RPC library and interfaces work ok. (This used to be commit d392d6e92b4145106e073ec4410796e3913320c0)
Diffstat (limited to 'source4/torture/libnet')
-rw-r--r--source4/torture/libnet/libnet_share.c24
1 files changed, 6 insertions, 18 deletions
diff --git a/source4/torture/libnet/libnet_share.c b/source4/torture/libnet/libnet_share.c
index b6b0b37d01..b1657c0922 100644
--- a/source4/torture/libnet/libnet_share.c
+++ b/source4/torture/libnet/libnet_share.c
@@ -195,24 +195,19 @@ static BOOL test_addshare(struct dcerpc_pipe *svc_pipe, TALLOC_CTX *mem_ctx, con
}
-BOOL torture_delshare(struct torture_context *torture)
+bool torture_delshare(struct torture_context *torture)
{
struct dcerpc_pipe *p;
struct dcerpc_binding *bind;
struct libnet_context* libnetctx;
const char *host;
- TALLOC_CTX *mem_ctx;
NTSTATUS status;
BOOL ret = True;
struct libnet_DelShare share;
- mem_ctx = talloc_init("test_listshares");
host = torture_setting_string(torture, "host", NULL);
status = torture_rpc_binding(torture, &bind);
- if (!NT_STATUS_IS_OK(status)) {
- ret = False;
- goto done;
- }
+ torture_assert_ntstatus_ok(torture, status, "Failed to get binding");
libnetctx = libnet_context_init(NULL);
libnetctx->cred = cmdline_credentials;
@@ -221,22 +216,15 @@ BOOL torture_delshare(struct torture_context *torture)
&p,
&ndr_table_srvsvc);
- if (!test_addshare(p, mem_ctx, host, TEST_SHARENAME)) {
- ret = False;
- goto done;
+ if (!test_addshare(p, torture, host, TEST_SHARENAME)) {
+ return false;
}
share.in.server_name = bind->host;
share.in.share_name = TEST_SHARENAME;
- status = libnet_DelShare(libnetctx, mem_ctx, &share);
- if (!NT_STATUS_IS_OK(status)) {
- ret = False;
- goto done;
- }
+ status = libnet_DelShare(libnetctx, torture, &share);
+ torture_assert_ntstatus_ok(torture, status, "Failed to delete share");
-
-done:
- talloc_free(mem_ctx);
return ret;
}