#include "lib/cmdline/popt_common.h"
#include "torture/util.h"
#include "param/param.h"
+#include "libcli/resolve/resolve.h"
#define BASEDIR "\\composite"
io1.in.data = data;
io1.in.size = len;
- printf("testing savefile\n");
+ printf("Testing savefile\n");
status = smb_composite_savefile(cli->tree, &io1);
if (!NT_STATUS_IS_OK(status)) {
io2.in.fname = fname;
- printf("testing parallel loadfile with %d ops\n", num_ops);
+ printf("Testing parallel loadfile with %d ops\n", num_ops);
c = talloc_array(tctx, struct composite_context *, num_ops);
int i;
size_t len = random() % 10000;
extern int torture_numops;
- struct event_context *event_ctx;
+ struct tevent_context *event_ctx;
int *count = talloc_zero(tctx, int);
bool ret = true;
io1.in.data = data;
io1.in.size = len;
- printf("testing savefile\n");
+ printf("Testing savefile\n");
status = smb_composite_savefile(cli->tree, &io1);
if (!NT_STATUS_IS_OK(status)) {
}
io2.in.dest_host = torture_setting_string(tctx, "host", NULL);
- io2.in.port = 0;
+ io2.in.ports = lp_smb_ports(tctx->lp_ctx);
io2.in.called_name = torture_setting_string(tctx, "host", NULL);
io2.in.service = torture_setting_string(tctx, "share", NULL);
io2.in.service_type = "A:";
io2.in.credentials = cmdline_credentials;
io2.in.workgroup = lp_workgroup(tctx->lp_ctx);
io2.in.filename = fname;
+ io2.in.resolve_ctx = lp_resolve_context(tctx->lp_ctx);
+ io2.in.iconv_convenience = lp_iconv_convenience(tctx->lp_ctx);
+ io2.in.gensec_settings = lp_gensec_settings(tctx, tctx->lp_ctx);
+ lp_smbcli_options(tctx->lp_ctx, &io2.in.options);
+ lp_smbcli_session_options(tctx->lp_ctx, &io2.in.session_options);
- printf("testing parallel fetchfile with %d ops\n", torture_numops);
+ printf("Testing parallel fetchfile with %d ops\n", torture_numops);
event_ctx = cli->transport->socket->event.ctx;
c = talloc_array(tctx, struct composite_context *, torture_numops);
struct smb_composite_appendacl **io;
struct smb_composite_appendacl **io_orig;
struct composite_context **c;
- struct event_context *event_ctx;
+ struct tevent_context *event_ctx;
struct security_descriptor *test_sd;
struct security_ace *ace;
/* set parameters for appendacl async call */
- printf("testing parallel appendacl with %d ops\n", num_ops);
+ printf("Testing parallel appendacl with %d ops\n", num_ops);
c = talloc_array(tctx, struct composite_context *, num_ops);
io = talloc_array(tctx, struct smb_composite_appendacl *, num_ops);
c[i]->async.private_data = count;
}
- event_ctx = talloc_reference(tctx, cli->tree->session->transport->socket->event.ctx);
+ event_ctx = tctx->ev;
printf("waiting for completion\n");
while (*count != num_ops) {
event_loop_once(event_ctx);
int i;
extern int torture_numops;
- struct event_context *event_ctx;
+ struct tevent_context *event_ctx;
int *count = talloc_zero(tctx, int);
bool ret = true;
io1.in.dest_host = torture_setting_string(tctx, "host", NULL);
- io1.in.port = 0;
+ io1.in.dest_ports = lp_smb_ports(tctx->lp_ctx);
+ io1.in.socket_options = lp_socket_options(tctx->lp_ctx);
io1.in.called_name = torture_setting_string(tctx, "host", NULL);
io1.in.service = torture_setting_string(tctx, "share", NULL);
io1.in.service_type = "A:";
io1.in.credentials = cmdline_credentials;
io1.in.workgroup = lp_workgroup(tctx->lp_ctx);
io1.in.level = RAW_QFS_OBJECTID_INFORMATION;
+ io1.in.iconv_convenience = lp_iconv_convenience(tctx->lp_ctx);
+ io1.in.gensec_settings = lp_gensec_settings(tctx, tctx->lp_ctx);
- printf("testing parallel queryfsinfo [Object ID] with %d ops\n", torture_numops);
+ printf("Testing parallel queryfsinfo [Object ID] with %d ops\n",
+ torture_numops);
- event_ctx = talloc_reference(tctx, cli->tree->session->transport->socket->event.ctx);
+ event_ctx = tctx->ev;
c = talloc_array(tctx, struct composite_context *, torture_numops);
for (i=0; i<torture_numops; i++) {
- c[i] = smb_composite_fsinfo_send(cli->tree,&io1);
+ c[i] = smb_composite_fsinfo_send(cli->tree, &io1, lp_resolve_context(tctx->lp_ctx));
c[i]->async.fn = loadfile_complete;
c[i]->async.private_data = count;
}