From 0593fd96fb4e12dd1014dd936e088521fb2b0231 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 21 Jan 2004 03:30:03 +0000 Subject: cope with a wider range of broken servers in the RAW-QFILEINFO test (This used to be commit eb6fc29caf5be8446c31668748a5cce387c71627) --- source4/torture/raw/qfileinfo.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'source4/torture/raw') diff --git a/source4/torture/raw/qfileinfo.c b/source4/torture/raw/qfileinfo.c index 5d3f543c0f..881916c2f7 100644 --- a/source4/torture/raw/qfileinfo.c +++ b/source4/torture/raw/qfileinfo.c @@ -217,7 +217,7 @@ BOOL torture_raw_qfileinfo(int dummy) if (count != 0) { ret = False; printf("%d levels failed\n", count); - if (count > 32) { + if (count > 35) { printf("too many level failures - giving up\n"); goto done; } @@ -502,15 +502,15 @@ BOOL torture_raw_qfileinfo(int dummy) #define NAME_CHECK(sname, stype, tfield, flags) do { \ s1 = fnum_find(sname); \ - if ((s1 && strcmp(s1->stype.out.tfield.s, correct_name) != 0) || \ - wire_bad_flags(&s1->stype.out.tfield, flags)) { \ + if (s1 && (strcmp(s1->stype.out.tfield.s, correct_name) != 0 || \ + wire_bad_flags(&s1->stype.out.tfield, flags))) { \ printf("(%d) handle %s/%s incorrect - '%s/%d'\n", __LINE__, #stype, #tfield, \ s1->stype.out.tfield.s, s1->stype.out.tfield.private_length); \ ret = False; \ } \ s1 = fname_find(sname); \ - if ((s1 && strcmp(s1->stype.out.tfield.s, correct_name)) != 0 || \ - wire_bad_flags(&s1->stype.out.tfield, flags)) { \ + if (s1 && (strcmp(s1->stype.out.tfield.s, correct_name) != 0 || \ + wire_bad_flags(&s1->stype.out.tfield, flags))) { \ printf("(%d) path %s/%s incorrect - '%s/%d'\n", __LINE__, #stype, #tfield, \ s1->stype.out.tfield.s, s1->stype.out.tfield.private_length); \ ret = False; \ @@ -668,9 +668,11 @@ BOOL torture_raw_qfileinfo(int dummy) NAME_PATH_CHECK("INTERNAL_INFORMATION", internal_information, file_id); NAME_PATH_CHECK("POSITION_INFORMATION", position_information, position); - printf("fnum pos = %.0f, fname pos = %.0f\n", - (double)s2->position_information.out.position, - (double)s1->position_information.out.position ); + if (s1 && s2) { + printf("fnum pos = %.0f, fname pos = %.0f\n", + (double)s2->position_information.out.position, + (double)s1->position_information.out.position ); + } NAME_PATH_CHECK("MODE_INFORMATION", mode_information, mode); NAME_PATH_CHECK("ALIGNMENT_INFORMATION", alignment_information, alignment_requirement); NAME_PATH_CHECK("ATTRIBUTE_TAG_INFORMATION", attribute_tag_information, attrib); -- cgit