summaryrefslogtreecommitdiff
path: root/source4/torture/raw/qfsinfo.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-11-10 12:29:44 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:46:04 -0500
commit498b2892dd598737900429584a01df76325ffa8f (patch)
tree0ff4061eb652c275908da738b1ec51f9977844f3 /source4/torture/raw/qfsinfo.c
parenta2d2128b8a555f3434324ccd93ff72d918825bd3 (diff)
downloadsamba-498b2892dd598737900429584a01df76325ffa8f.tar.gz
r11638: fixed handling of null volume name in RAW-QFSINFO test
thanks to Stephen Zarkos for finding this (This used to be commit 8331eee64cb679c091ca46cc001ff9851eb91f0e)
Diffstat (limited to 'source4/torture/raw/qfsinfo.c')
-rw-r--r--source4/torture/raw/qfsinfo.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source4/torture/raw/qfsinfo.c b/source4/torture/raw/qfsinfo.c
index 7576c4b22ae..9d3b703456a 100644
--- a/source4/torture/raw/qfsinfo.c
+++ b/source4/torture/raw/qfsinfo.c
@@ -83,9 +83,8 @@ static union smb_fsinfo *find(const char *name)
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 @@ BOOL torture_raw_qfsinfo(void)
#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 @@ BOOL torture_raw_qfsinfo(void)
}} 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);