summaryrefslogtreecommitdiff
path: root/source4/torture/local
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-11-09 01:11:45 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:25:25 -0500
commitfe2a5a8abf3e1fb916e49700c5293eb91f9524ed (patch)
tree5ac5d0e9a2936a3393af5e8bba0d370acf26fc90 /source4/torture/local
parented77e4e57beee0c9c8b0c4c75626c41ebfc5b0c4 (diff)
downloadsamba-fe2a5a8abf3e1fb916e49700c5293eb91f9524ed.tar.gz
samba-fe2a5a8abf3e1fb916e49700c5293eb91f9524ed.tar.bz2
samba-fe2a5a8abf3e1fb916e49700c5293eb91f9524ed.zip
r19645: don't pass NULL as mem_ctx...
metze (This used to be commit 643a38bc30a0df1582035b8d264e0dbbc2d2e152)
Diffstat (limited to 'source4/torture/local')
-rw-r--r--source4/torture/local/resolve.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/source4/torture/local/resolve.c b/source4/torture/local/resolve.c
index 62aa600a3c..96da65a8c2 100644
--- a/source4/torture/local/resolve.c
+++ b/source4/torture/local/resolve.c
@@ -40,11 +40,11 @@ static bool test_async_resolve(struct torture_context *tctx)
ZERO_STRUCT(n);
n.name = host;
- torture_comment(tctx, "Testing async resolve of localhost for %d seconds\n",
- timelimit);
+ torture_comment(tctx, "Testing async resolve of '%s' for %d seconds\n",
+ host, timelimit);
while (timeval_elapsed(&tv) < timelimit) {
const char *s;
- struct composite_context *c = resolve_name_host_send(&n, ev);
+ struct composite_context *c = resolve_name_host_send(mem_ctx, ev, &n);
torture_assert(tctx, c != NULL, "resolve_name_host_send");
torture_assert_ntstatus_ok(tctx, resolve_name_host_recv(c, mem_ctx, &s),
"async resolve failed");
@@ -52,7 +52,7 @@ static bool test_async_resolve(struct torture_context *tctx)
}
torture_comment(tctx, "async rate of %.1f resolves/sec\n",
- count/timeval_elapsed(&tv));
+ count/timeval_elapsed(&tv));
return true;
}
@@ -66,23 +66,22 @@ static bool test_sync_resolve(struct torture_context *tctx)
int count = 0;
const char *host = torture_setting_string(tctx, "host", NULL);
- torture_comment(tctx, "Testing sync resolve of localhost for %d seconds\n",
- timelimit);
+ torture_comment(tctx, "Testing sync resolve of '%s' for %d seconds\n",
+ host, timelimit);
while (timeval_elapsed(&tv) < timelimit) {
sys_inet_ntoa(interpret_addr2(host));
count++;
}
torture_comment(tctx, "sync rate of %.1f resolves/sec\n",
- count/timeval_elapsed(&tv));
+ count/timeval_elapsed(&tv));
return true;
}
struct torture_suite *torture_local_resolve(TALLOC_CTX *mem_ctx)
{
- struct torture_suite *suite = torture_suite_create(mem_ctx,
- "RESOLVE");
+ struct torture_suite *suite = torture_suite_create(mem_ctx, "RESOLVE");
torture_suite_add_simple_test(suite, "async", test_async_resolve);
torture_suite_add_simple_test(suite, "sync", test_sync_resolve);