svn commit: samba r11638 - in branches/SAMBA_4_0/source/torture/raw: .

tridge at samba.org tridge at samba.org
Thu Nov 10 12:29:46 GMT 2005


Author: tridge
Date: 2005-11-10 12:29:44 +0000 (Thu, 10 Nov 2005)
New Revision: 11638

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=11638

Log:

fixed handling of null volume name in RAW-QFSINFO test
thanks to Stephen Zarkos for finding this


Modified:
   branches/SAMBA_4_0/source/torture/raw/qfsinfo.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/raw/qfsinfo.c
===================================================================
--- branches/SAMBA_4_0/source/torture/raw/qfsinfo.c	2005-11-10 12:25:46 UTC (rev 11637)
+++ branches/SAMBA_4_0/source/torture/raw/qfsinfo.c	2005-11-10 12:29:44 UTC (rev 11638)
@@ -83,9 +83,8 @@
         ret = False; \
 }} while(0)
 
-#define STR_EQUAL(n1, v1, n2, v2) do {if (!s1->n1.out.v1 && !s2->n2.out.v2) return True; \
-       if (!s1->n1.out.v1 || !s2->n2.out.v2) return False; \
-       if (strcmp(s1->n1.out.v1, s2->n2.out.v2)) { \
+#define STR_EQUAL(n1, v1, n2, v2) do { \
+       if (strcmp_safe(s1->n1.out.v1, s2->n2.out.v2)) { \
          printf("%s/%s [%s] != %s/%s [%s] at %s(%d)\n", \
                #n1, #v1, s1->n1.out.v1, \
                #n2, #v2, s2->n2.out.v2, \
@@ -287,7 +286,7 @@
 #define STR_CHECK(sname, stype, field, flags) do { \
 	s1 = find(sname); \
 	if (s1) { \
-		if (wire_bad_flags(&s1->stype.out.field, flags, cli)) { \
+		if (s1->stype.out.field.s && wire_bad_flags(&s1->stype.out.field, flags, cli)) { \
 			printf("(%d) incorrect string termination in %s/%s\n", \
 			       __LINE__, #stype, #field); \
 			ret = False; \
@@ -295,6 +294,7 @@
 	}} while (0)
 
 	printf("check for correct termination\n");
+	
 	STR_CHECK("VOLUME",                volume,         volume_name, 0);
 	STR_CHECK("VOLUME_INFO",           volume_info,    volume_name, STR_UNICODE);
 	STR_CHECK("VOLUME_INFORMATION",    volume_info,    volume_name, STR_UNICODE);



More information about the samba-cvs mailing list