From fe2a5a8abf3e1fb916e49700c5293eb91f9524ed Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 9 Nov 2006 01:11:45 +0000 Subject: r19645: don't pass NULL as mem_ctx... metze (This used to be commit 643a38bc30a0df1582035b8d264e0dbbc2d2e152) --- source4/torture/local/resolve.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'source4/torture/local') 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); -- cgit