summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1997-11-11 02:51:20 +0000
committerAndrew Tridgell <tridge@samba.org>1997-11-11 02:51:20 +0000
commit30dfa00877514274aef2cd3e1bd954b017beed10 (patch)
treedf6126978f1a9c21f76cceee92dcdce7916b87b7 /source3/utils
parent5b6d9d4376ff163a4ee4b4e7a7939c56e5394ffb (diff)
downloadsamba-30dfa00877514274aef2cd3e1bd954b017beed10.tar.gz
samba-30dfa00877514274aef2cd3e1bd954b017beed10.tar.bz2
samba-30dfa00877514274aef2cd3e1bd954b017beed10.zip
added code to test the cli_NetServerEnum() function in clientgen.c
(This used to be commit 4933ba49b55a9a438b006c977c7ab6f5960065a3)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/torture.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/source3/utils/torture.c b/source3/utils/torture.c
index 506f31481c..1e284fb93d 100644
--- a/source3/utils/torture.c
+++ b/source3/utils/torture.c
@@ -590,6 +590,43 @@ static void run_unlinktest(void)
+static void browse_callback(char *sname, uint32 stype, char *comment)
+{
+ printf("\t%20.20s %08x %s\n", sname, stype, comment);
+}
+
+
+/*
+ This test checks the browse list code
+
+*/
+static void run_browsetest(void)
+{
+ static struct cli_state cli;
+
+ printf("staring browse test\n");
+
+ if (!open_connection(&cli)) {
+ return;
+ }
+
+ printf("domain list:\n");
+ cli_NetServerEnum(&cli, workgroup,
+ SV_TYPE_DOMAIN_ENUM,
+ browse_callback);
+
+ printf("machine list:\n");
+ cli_NetServerEnum(&cli, workgroup,
+ SV_TYPE_ALL,
+ browse_callback);
+
+ close_connection(&cli);
+
+ printf("browse test finished\n");
+}
+
+
+
static void create_procs(int nprocs, int numops)
{
int i, status;
@@ -704,6 +741,7 @@ static void create_procs(int nprocs, int numops)
run_locktest2();
run_locktest3(numops);
run_unlinktest();
+ run_browsetest();
return(0);
}