}
while (!done) {
- event_loop_once(evt);
+ tevent_loop_once(evt);
}
torture_close_connection(cli1);
}
while (!done) {
- event_loop_once(evt);
+ tevent_loop_once(evt);
}
torture_close_connection(cli1);
i = 0;
while (i < nprocs * torture_numops) {
- event_loop_once(ev);
+ tevent_loop_once(ev);
}
result = true;
for (i=0;i<100;i++) {
struct smbcli_request *req;
req = smb_raw_negotiate_send(cli->transport, lpcfg_unicode(tctx->lp_ctx), PROTOCOL_NT1);
- event_loop_once(cli->transport->socket->event.ctx);
+ tevent_loop_once(cli->transport->socket->event.ctx);
if (req->state == SMBCLI_REQUEST_ERROR) {
if (i > 0) {
torture_comment(tctx, "Failed to fill pipe packet[%d] - %s (ignored)\n", i+1, nt_errstr(req->status));
finished++;
break;
default:
- event_loop_once(ev);
+ tevent_loop_once(ev);
}
}
}
torture_assert_ntstatus_ok(tctx, status, "Failed to send netlogon request");
while (timeval_elapsed(&tv) < 5 && !dgmslot->private_data) {
- event_loop_once(dgmsock->event_ctx);
+ tevent_loop_once(dgmsock->event_ctx);
}
response = talloc_get_type(dgmslot->private_data, struct nbt_netlogon_response);
torture_assert_ntstatus_ok(tctx, status, "Failed to send netlogon request");
while (timeval_elapsed(&tv) < 5 && dgmslot->private_data == NULL) {
- event_loop_once(dgmsock->event_ctx);
+ tevent_loop_once(dgmsock->event_ctx);
}
response = talloc_get_type(dgmslot->private_data, struct nbt_netlogon_response);
torture_assert_ntstatus_ok(tctx, status, "Failed to send netlogon request");
while (timeval_elapsed(&tv) < 5 && dgmslot->private_data == NULL) {
- event_loop_once(dgmsock->event_ctx);
+ tevent_loop_once(dgmsock->event_ctx);
}
response = talloc_get_type(dgmslot->private_data, struct nbt_netlogon_response);
while (timeval_elapsed(&tv) < 5 && dgmslot->private_data == NULL) {
- event_loop_once(dgmsock->event_ctx);
+ tevent_loop_once(dgmsock->event_ctx);
}
response = talloc_get_type(dgmslot->private_data, struct nbt_netlogon_response);
while (timeval_elapsed(&tv) < 5 && dgmslot->private_data == NULL) {
- event_loop_once(dgmsock->event_ctx);
+ tevent_loop_once(dgmsock->event_ctx);
}
response = talloc_get_type(dgmslot->private_data, struct nbt_netlogon_response);
while (timeval_elapsed(&tv) < 5 && dgmslot->private_data == NULL) {
- event_loop_once(dgmsock->event_ctx);
+ tevent_loop_once(dgmsock->event_ctx);
}
response = talloc_get_type(dgmslot->private_data, struct nbt_netlogon_response);
torture_assert_ntstatus_ok(tctx, status, "Failed to send ntlogon request");
while (timeval_elapsed(&tv) < 5 && dgmslot->private_data == NULL) {
- event_loop_once(dgmsock->event_ctx);
+ tevent_loop_once(dgmsock->event_ctx);
}
response = talloc_get_type(dgmslot->private_data, struct nbt_netlogon_response);
torture_assert_ntstatus_ok(tctx, status, "Failed to send ntlogon request");
while (timeval_elapsed(&tv) < 5 && dgmslot->private_data == NULL) {
- event_loop_once(dgmsock->event_ctx);
+ tevent_loop_once(dgmsock->event_ctx);
}
response = talloc_get_type(dgmslot->private_data, struct nbt_netlogon_response);
torture_assert_ntstatus_ok(tctx, status, "Failed to send ntlogon request");
while (timeval_elapsed(&tv) < 5 && !dgmslot->private_data) {
- event_loop_once(dgmsock->event_ctx);
+ tevent_loop_once(dgmsock->event_ctx);
}
response = talloc_get_type(dgmslot->private_data, struct nbt_netlogon_response);
torture_assert_ntstatus_ok(tctx, status, "Failed to send ntlogon request");
while (timeval_elapsed(&tv) < 5 && !dgmslot->private_data) {
- event_loop_once(dgmsock->event_ctx);
+ tevent_loop_once(dgmsock->event_ctx);
}
response = talloc_get_type(dgmslot->private_data, struct nbt_netlogon_response);
}
}
- event_loop_once(nbtsock->event_ctx);
+ tevent_loop_once(nbtsock->event_ctx);
}
while (num_sent != (result->num_pass + result->num_fail)) {
- event_loop_once(nbtsock->event_ctx);
+ tevent_loop_once(nbtsock->event_ctx);
}
torture_comment(tctx, "%.1f queries per second (%d failures) \n",
*/
req = nbt_name_register_send(nbtsock, &name_register);
while (true) {
- event_loop_once(nbtsock->event_ctx);
+ tevent_loop_once(nbtsock->event_ctx);
if (req->state != NBT_REQUEST_WAIT) {
break;
}
req->state = NBT_REQUEST_SEND;
DLIST_ADD_END(nbtsock->send_queue, req,
struct nbt_name_request *);
- EVENT_FD_WRITEABLE(nbtsock->fde);
+ TEVENT_FD_WRITEABLE(nbtsock->fde);
break;
}
}
}
}
- event_loop_once(nbtsock->event_ctx);
+ tevent_loop_once(nbtsock->event_ctx);
}
while (num_sent != (state->pass_count + state->fail_count)) {
- event_loop_once(nbtsock->event_ctx);
+ tevent_loop_once(nbtsock->event_ctx);
}
torture_comment(tctx, "%.1f queries per second (%d failures) \n",
req = nbt_name_register_send(ctx->nbtsock, name_register);
/* push the request on the wire */
- event_loop_once(ctx->nbtsock->event_ctx);
+ tevent_loop_once(ctx->nbtsock->event_ctx);
/*
* if we register multiple addresses,
end = timeval_current_ofs(records[i].defend.timeout,0);
records[i].defend.ret = true;
while (records[i].defend.timeout > 0) {
- event_loop_once(ctx->nbtsock_srv->event_ctx);
+ tevent_loop_once(ctx->nbtsock_srv->event_ctx);
if (timeval_expired(&end)) break;
}
ret &= records[i].defend.ret;
end = timeval_current_ofs(records[i].defend.timeout,0);
records[i].defend.ret = true;
while (records[i].defend.timeout > 0) {
- event_loop_once(ctx->nbtsock_srv->event_ctx);
+ tevent_loop_once(ctx->nbtsock_srv->event_ctx);
if (timeval_expired(&end)) break;
}
ret &= records[i].defend.ret;
end = timeval_current_ofs(records[i].defend.timeout,0);
records[i].defend.ret = true;
while (records[i].defend.timeout > 0) {
- event_loop_once(ctx->nbtsock_srv->event_ctx);
+ tevent_loop_once(ctx->nbtsock_srv->event_ctx);
if (timeval_expired(&end)) break;
}
ret &= records[i].defend.ret;
/* make sure we push the reply to the wire */
while (nbtsock->send_queue) {
- event_loop_once(nbtsock->event_ctx);
+ tevent_loop_once(nbtsock->event_ctx);
}
smb_msleep(1000);
/* make sure we push the reply to the wire */
while (nbtsock->send_queue) {
- event_loop_once(nbtsock->event_ctx);
+ tevent_loop_once(nbtsock->event_ctx);
}
smb_msleep(1000);
printf("waiting for completion\n");
while (*count != num_ops) {
- event_loop_once(cli->transport->socket->event.ctx);
+ tevent_loop_once(cli->transport->socket->event.ctx);
if (torture_setting_bool(tctx, "progress", true)) {
printf("(%s) count=%d\r", __location__, *count);
fflush(stdout);
printf("waiting for completion\n");
while (*count != torture_numops) {
- event_loop_once(event_ctx);
+ tevent_loop_once(event_ctx);
if (torture_setting_bool(tctx, "progress", true)) {
printf("(%s) count=%d\r", __location__, *count);
fflush(stdout);
event_ctx = tctx->ev;
printf("waiting for completion\n");
while (*count != num_ops) {
- event_loop_once(event_ctx);
+ tevent_loop_once(event_ctx);
if (torture_setting_bool(tctx, "progress", true)) {
printf("(%s) count=%d\r", __location__, *count);
fflush(stdout);
printf("waiting for completion\n");
while (*count < torture_numops) {
- event_loop_once(event_ctx);
+ tevent_loop_once(event_ctx);
if (torture_setting_bool(tctx, "progress", true)) {
printf("(%s) count=%d\r", __location__, *count);
fflush(stdout);
status = smb_composite_connect_recv(ctx, state->mem_ctx);
if (!NT_STATUS_IS_OK(status)) {
talloc_free(state->te);
- state->te = event_add_timed(state->ev, state->mem_ctx,
+ state->te = tevent_add_timer(state->ev, state->mem_ctx,
timeval_current_ofs(1,0),
reopen_connection, state);
return;
state->tree = io->out.tree;
/* do the reopen as a separate event */
- event_add_timed(state->ev, state->mem_ctx, timeval_zero(), reopen_file, state);
+ tevent_add_timer(state->ev, state->mem_ctx, timeval_zero(), reopen_file, state);
}
num_connected--;
DEBUG(0,("reopening connection to %s\n", state->dest_host));
talloc_free(state->te);
- state->te = event_add_timed(state->ev, state->mem_ctx,
+ state->te = tevent_add_timer(state->ev, state->mem_ctx,
timeval_current_ofs(1,0),
reopen_connection, state);
} else {
num_connected--;
DEBUG(0,("reopening connection to %s\n", state->dest_host));
talloc_free(state->te);
- state->te = event_add_timed(state->ev, state->mem_ctx,
+ state->te = tevent_add_timer(state->ev, state->mem_ctx,
timeval_current_ofs(1,0),
reopen_connection, state);
}
}
printf("\r");
fflush(stdout);
- event_add_timed(ev, state, timeval_current_ofs(1, 0), report_rate, state);
+ tevent_add_timer(ev, state, timeval_current_ofs(1, 0), report_rate, state);
/* send an echo on each interface to ensure it stays alive - this helps
with IP takeover */
tv = timeval_current();
if (progress) {
- event_add_timed(torture->ev, state, timeval_current_ofs(1, 0), report_rate, state);
+ tevent_add_timer(torture->ev, state, timeval_current_ofs(1, 0), report_rate, state);
}
printf("Running for %d seconds\n", timelimit);
while (timeval_elapsed(&tv) < timelimit) {
- event_loop_once(torture->ev);
+ tevent_loop_once(torture->ev);
if (lock_failed) {
DEBUG(0,("locking failed\n"));
latencies[OP_LOADFILE],
worst_latencies[OP_LOADFILE]);
fflush(stdout);
- event_add_timed(ev, state, timeval_current_ofs(1, 0), report_rate, state);
+ tevent_add_timer(ev, state, timeval_current_ofs(1, 0), report_rate, state);
for (i=0;i<OP_ENDOFLIST;i++) {
if (latencies[i] > worst_latencies[i]) {
tv = timeval_current();
if (progress) {
- event_add_timed(torture->ev, state, timeval_current_ofs(1, 0), report_rate, state);
+ tevent_add_timer(torture->ev, state, timeval_current_ofs(1, 0), report_rate, state);
}
printf("Running for %d seconds\n", timelimit);
while (timeval_elapsed(&tv) < timelimit) {
- event_loop_once(torture->ev);
+ tevent_loop_once(torture->ev);
if (test_failed) {
DEBUG(0,("test failed\n"));
while (state[i].loadfile ||
state[i].savefile ||
state[i].req) {
- event_loop_once(torture->ev);
+ tevent_loop_once(torture->ev);
}
}
break;
}
- if (event_loop_once(tctx->ev) != 0) {
+ if (tevent_loop_once(tctx->ev) != 0) {
torture_result(tctx, TORTURE_FAIL,
- "(%s): event_loop_once failed\n", __location__);
+ "(%s): tevent_loop_once failed\n", __location__);
return false;
}
}
status = smb_composite_connect_recv(ctx, state->mem_ctx);
if (!NT_STATUS_IS_OK(status)) {
talloc_free(state->te);
- state->te = event_add_timed(state->ev, state->mem_ctx,
+ state->te = tevent_add_timer(state->ev, state->mem_ctx,
timeval_current_ofs(1,0),
reopen_connection, state);
return;
DEBUG(0,("[%u] reopening connection to %s\n",
state->client_num, state->dest_host));
talloc_free(state->te);
- state->te = event_add_timed(state->ev, state->mem_ctx,
+ state->te = tevent_add_timer(state->ev, state->mem_ctx,
timeval_current_ofs(1,0),
reopen_connection, state);
return;
DEBUG(0,("[%u] reopening connection to %s\n",
state->client_num, state->dest_host));
talloc_free(state->te);
- state->te = event_add_timed(state->ev, state->mem_ctx,
+ state->te = tevent_add_timer(state->ev, state->mem_ctx,
timeval_current_ofs(1,0),
reopen_connection, state);
return;
DEBUG(0,("[%u] reopening connection to %s\n",
state->client_num, state->dest_host));
talloc_free(state->te);
- state->te = event_add_timed(state->ev, state->mem_ctx,
+ state->te = tevent_add_timer(state->ev, state->mem_ctx,
timeval_current_ofs(1,0),
reopen_connection, state);
}
}
printf("\r");
fflush(stdout);
- report_te = event_add_timed(ev, state, timeval_current_ofs(1, 0),
+ report_te = tevent_add_timer(ev, state, timeval_current_ofs(1, 0),
report_rate, state);
/* send an echo on each interface to ensure it stays alive - this helps
tv = timeval_current();
if (progress) {
- report_te = event_add_timed(torture->ev, state, timeval_current_ofs(1, 0),
+ report_te = tevent_add_timer(torture->ev, state, timeval_current_ofs(1, 0),
report_rate, state);
}
printf("Running for %d seconds\n", timelimit);
while (timeval_elapsed(&tv) < timelimit) {
- event_loop_once(torture->ev);
+ tevent_loop_once(torture->ev);
if (open_failed) {
DEBUG(0,("open failed\n"));
/* Wait .1 seconds for an oplock break */
ne = tevent_timeval_current_ofs(0, 100000);
- if ((te = event_add_timed(tctx->ev, tmp_ctx, ne, timeout_cb, ×up))
+ if ((te = tevent_add_timer(tctx->ev, tmp_ctx, ne, timeout_cb, ×up))
== NULL)
{
torture_comment(tctx, "Failed to wait for an oplock break. "
}
while (!timesup && break_info.count < old_count + 1) {
- if (event_loop_once(tctx->ev) != 0) {
+ if (tevent_loop_once(tctx->ev) != 0) {
torture_comment(tctx, "Failed to wait for an oplock "
"break. test results may not be "
"accurate.");
}
printf("Waiting for oplock events\n");
- event_loop_wait(ev);
+ tevent_loop_wait(ev);
return true;
}
ctx = dcerpc_event_context(p);
while (total_done < ASYNC_COUNT) {
- torture_assert(tctx, event_loop_once(ctx) == 0,
+ torture_assert(tctx, tevent_loop_once(ctx) == 0,
"Event context loop failed");
for (i=0;i<ASYNC_COUNT;i++) {
if (done2[i] == false && done1[i] == true) {
}
while (replies >= 0 && replies < num_async_requests) {
- event_loop_once(tctx->ev);
+ tevent_loop_once(tctx->ev);
}
talloc_free(req);
/* even with this flush per request a w2k3 server seems to
clag with multiple outstanding requests. bleergh. */
- torture_assert_int_equal(tctx, event_loop_once(dcerpc_event_context(p)), 0,
- "event_loop_once failed");
+ torture_assert_int_equal(tctx, tevent_loop_once(dcerpc_event_context(p)), 0,
+ "tevent_loop_once failed");
}
for (i=0;i<ASYNC_COUNT;i++) {
}
while (NT_STATUS_IS_OK(s->error) && s->nprocs != s->nconns) {
- int ev_ret = event_loop_once(torture->ev);
- torture_assert(torture, ev_ret == 0, "event_loop_once failed");
+ int ev_ret = tevent_loop_once(torture->ev);
+ torture_assert(torture, ev_ret == 0, "tevent_loop_once failed");
#endif
}
torture_assert_ntstatus_ok(torture, s->error, "Failed establish a connect");
end = timeval_add(&start, s->timelimit, 0);
while (NT_STATUS_IS_OK(s->error) && !timeval_expired(&end)) {
- int ev_ret = event_loop_once(torture->ev);
- torture_assert(torture, ev_ret == 0, "event_loop_once failed");
+ int ev_ret = tevent_loop_once(torture->ev);
+ torture_assert(torture, ev_ret == 0, "tevent_loop_once failed");
}
torture_assert_ntstatus_ok(torture, s->error, "Failed some request");
s->stopped = true;
break;
}
- if (event_loop_once(tctx->ev) != 0) {
- torture_comment(tctx, "event_loop_once failed\n");
+ if (tevent_loop_once(tctx->ev) != 0) {
+ torture_comment(tctx, "tevent_loop_once failed\n");
ret = false;
goto done;
}
#define WAIT_FOR_ASYNC_RESPONSE(req) \
while (!req->cancel.can_cancel && req->state <= SMB2_REQUEST_RECV) { \
- if (event_loop_once(req->transport->socket->event.ctx) != 0) { \
+ if (tevent_loop_once(req->transport->socket->event.ctx) != 0) { \
break; \
} \
}
req = smb2_notify_send(tree, &n);
while (!req->cancel.can_cancel && req->state <= SMB2_REQUEST_RECV) {
- if (event_loop_once(req->transport->socket->event.ctx) != 0) {
+ if (tevent_loop_once(req->transport->socket->event.ctx) != 0) {
break;
}
}
req = smb2_notify_send(tree, &n);
while (!req->cancel.can_cancel && req->state <= SMB2_REQUEST_RECV) {
- if (event_loop_once(req->transport->socket->event.ctx) != 0) {
+ if (tevent_loop_once(req->transport->socket->event.ctx) != 0) {
break;
}
}
req = smb2_notify_send(tree, &n);
while (!req->cancel.can_cancel && req->state <= SMB2_REQUEST_RECV) {
- if (event_loop_once(req->transport->socket->event.ctx) != 0) {
+ if (tevent_loop_once(req->transport->socket->event.ctx) != 0) {
break;
}
}
req = smb2_notify_send(tree, &n);
while (!req->cancel.can_cancel && req->state <= SMB2_REQUEST_RECV) {
- if (event_loop_once(req->transport->socket->event.ctx) != 0) {
+ if (tevent_loop_once(req->transport->socket->event.ctx) != 0) {
break;
}
}
n.in.buffer_size = max_buffer_size;
req = smb2_notify_send(tree, &n);
while (!req->cancel.can_cancel && req->state <= SMB2_REQUEST_RECV) {
- if (event_loop_once(req->transport->socket->event.ctx) != 0) {
+ if (tevent_loop_once(req->transport->socket->event.ctx) != 0) {
break;
}
}
/* Wait .1 seconds for an oplock break */
ne = tevent_timeval_current_ofs(0, 100000);
- if ((te = event_add_timed(tctx->ev, tmp_ctx, ne, timeout_cb, ×up))
+ if ((te = tevent_add_timer(tctx->ev, tmp_ctx, ne, timeout_cb, ×up))
== NULL)
{
torture_comment(tctx, "Failed to wait for an oplock break. "
}
while (!timesup && break_info.count < old_count + 1) {
- if (event_loop_once(tctx->ev) != 0) {
+ if (tevent_loop_once(tctx->ev) != 0) {
torture_comment(tctx, "Failed to wait for an oplock "
"break. test results may not be "
"accurate.");
}
torture_comment(tctx, "Waiting for oplock events\n");
- event_loop_wait(ev);
+ tevent_loop_wait(ev);
smb2_deltree(tree, BASEDIR);
talloc_free(mem_ctx);
return true;