s4 torture: Update RAW-QFILEINFO to only test info levels that are supported by the...
authorAravind Srinivasan <aravind.srinivasan@isilon.com>
Tue, 15 Dec 2009 17:22:07 +0000 (09:22 -0800)
committerTim Prouty <tprouty@samba.org>
Tue, 15 Dec 2009 17:40:05 +0000 (09:40 -0800)
Signed-off-by: Tim Prouty <tprouty@samba.org>
source4/torture/raw/qfileinfo.c

index d21d1dc776c87f48d96f7d24f77e4c119b86ab5e..85f9f1b093295f7f4ccfa0a60aefe7b1849b3887 100644 (file)
@@ -265,11 +265,26 @@ static bool torture_raw_qfileinfo_internals(struct torture_context *torture,
 
                if (is_ipc) {
                        if (levels[i].expected_ipc_access_denied && NT_STATUS_EQUAL(NT_STATUS_ACCESS_DENIED, levels[i].fname_status)) {
+                       } else if (!levels[i].only_handles &&
+                                  NT_STATUS_EQUAL(levels[i].fname_status,
+                                  NT_STATUS_NOT_SUPPORTED)) {
+                               torture_warning(torture, "fname level %s %s",
+                                       levels[i].name,
+                                       nt_errstr(levels[i].fname_status));
+                               continue;
                        } else if (!levels[i].only_handles && !NT_STATUS_EQUAL(NT_STATUS_INVALID_DEVICE_REQUEST, levels[i].fname_status)) {
                                printf("ERROR: fname level %s failed, expected NT_STATUS_INVALID_DEVICE_REQUEST - %s\n", 
                                       levels[i].name, nt_errstr(levels[i].fname_status));
                                count++;
                        }
+                       if (!levels[i].only_paths &&
+                           NT_STATUS_EQUAL(levels[i].fnum_status,
+                           NT_STATUS_NOT_SUPPORTED)) {
+                               torture_warning(torture, "fnum level %s %s",
+                                       levels[i].name,
+                                       nt_errstr(levels[i].fnum_status));
+                               continue;
+                       }
                        if (!levels[i].only_paths && !NT_STATUS_EQUAL(levels[i].expected_ipc_fnum_status, levels[i].fnum_status)) {
                                printf("ERROR: fnum level %s failed, expected %s - %s\n", 
                                       levels[i].name, nt_errstr(levels[i].expected_ipc_fnum_status), 
@@ -277,6 +292,24 @@ static bool torture_raw_qfileinfo_internals(struct torture_context *torture,
                                count++;
                        }
                } else {
+                       if (!levels[i].only_paths &&
+                           NT_STATUS_EQUAL(levels[i].fnum_status,
+                           NT_STATUS_NOT_SUPPORTED)) {
+                               torture_warning(torture, "fnum level %s %s",
+                                       levels[i].name,
+                                       nt_errstr(levels[i].fnum_status));
+                               continue;
+                       }
+
+                       if (!levels[i].only_handles &&
+                           NT_STATUS_EQUAL(levels[i].fname_status,
+                           NT_STATUS_NOT_SUPPORTED)) {
+                                torture_warning(torture, "fname level %s %s",
+                                       levels[i].name,
+                                       nt_errstr(levels[i].fname_status));
+                               continue;
+                       }
+
                        if (!levels[i].only_paths && !NT_STATUS_IS_OK(levels[i].fnum_status)) {
                                printf("ERROR: fnum level %s failed - %s\n", 
                                       levels[i].name, nt_errstr(levels[i].fnum_status));