summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafal Szczesniak <mimir@samba.org>2006-07-09 13:56:11 +0000
committerRafal Szczesniak <mimir@samba.org>2006-07-09 13:56:11 +0000
commit63e2da99a3d777edf47aa85c684ee15c62561c47 (patch)
tree6860b95332398438c2953e3470a09098154f365d
parent2c627ab388282d8195e04f705d0e7e9c4f854543 (diff)
downloadsamba-63e2da99a3d777edf47aa85c684ee15c62561c47.tar.gz
samba-63e2da99a3d777edf47aa85c684ee15c62561c47.tar.xz
samba-63e2da99a3d777edf47aa85c684ee15c62561c47.zip
r16900: Nicer display of the test results.
rafal
-rw-r--r--source/torture/libnet/libnet_lookup.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/source/torture/libnet/libnet_lookup.c b/source/torture/libnet/libnet_lookup.c
index c8e25817fc2..ac2f19b983d 100644
--- a/source/torture/libnet/libnet_lookup.c
+++ b/source/torture/libnet/libnet_lookup.c
@@ -24,6 +24,7 @@
#include "libnet/libnet.h"
#include "librpc/gen_ndr/nbt.h"
#include "librpc/rpc/dcerpc.h"
+#include "libcli/libcli.h"
#include "torture/torture.h"
@@ -36,7 +37,6 @@ BOOL torture_lookup(struct torture_context *torture)
struct libnet_Lookup lookup;
struct dcerpc_binding *bind;
const char *bindstr;
- const char *address;
mem_ctx = talloc_init("test_lookup");
@@ -126,6 +126,7 @@ BOOL torture_lookup_pdc(struct torture_context *torture)
TALLOC_CTX *mem_ctx;
struct libnet_context *ctx;
struct libnet_LookupDCs *lookup;
+ int i;
mem_ctx = talloc_init("test_lookup_pdc");
@@ -146,13 +147,20 @@ BOOL torture_lookup_pdc(struct torture_context *torture)
status = libnet_LookupDCs(ctx, mem_ctx, lookup);
if (!NT_STATUS_IS_OK(status)) {
- printf("Couldn't lookup pdc %s: %s\n", lookup->in.domain_name, nt_errstr(status));
+ printf("Couldn't lookup pdc %s: %s\n", lookup->in.domain_name,
+ nt_errstr(status));
ret = False;
goto done;
}
ret = True;
+ printf("DCs of domain [%s] found.\n", lookup->in.domain_name);
+ for (i = 0; i < lookup->out.num_dcs; i++) {
+ printf("\tDC[%d]: name=%s, address=%s\n", i, lookup->out.dcs[i].name,
+ lookup->out.dcs[i].address);
+ }
+
done:
talloc_free(mem_ctx);
return ret;