make sure we give the chosen workgroup in gentest
authorAndrew Tridgell <tridge@samba.org>
Wed, 13 Aug 2003 02:03:16 +0000 (02:03 +0000)
committerAndrew Tridgell <tridge@samba.org>
Wed, 13 Aug 2003 02:03:16 +0000 (02:03 +0000)
(This used to be commit b8aa4a9a8f53d5307105424d90895dffefdc5e64)

source4/torture/gentest.c

index abe6d057c3175342b2d050130603d98566030bc3..3519b51f14708f4db45462d550d787655fe54a3e 100644 (file)
@@ -175,7 +175,7 @@ static BOOL connect_servers(void)
                                                     "gentest",
                                                     servers[i].server_name, NULL, 
                                                     servers[i].share_name, "?????", 
-                                                    servers[i].username, "",
+                                                    servers[i].username, lp_workgroup(),
                                                     servers[i].password, 0, NULL);
                        if (!NT_STATUS_IS_OK(status)) {
                                printf("Failed to connect to \\\\%s\\%s - %s\n",
@@ -989,7 +989,11 @@ again:
 } while(0)
 
 #define CHECK_WSTR_EQUAL(field) do { \
-       if (strcmp(parm[0].field.s, parm[1].field.s) != 0 && !ignore_pattern(#field)) { \
+       if ((!parm[0].field.s && parm[1].field.s) || (parm[0].field.s && !parm[1].field.s)) { \
+               printf("%s is NULL!\n", #field); \
+               return False; \
+       } \
+       if (parm[0].field.s && strcmp(parm[0].field.s, parm[1].field.s) != 0 && !ignore_pattern(#field)) { \
                printf("Mismatch in %s - %s %s\n", #field, \
                       parm[0].field.s, parm[1].field.s); \
                return False; \