]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
DEVEL15-windows-tests-torture-20090405
authorJeffrey Altman <jaltman@secure-endpoints.com>
Sun, 5 Apr 2009 06:25:20 +0000 (06:25 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Sun, 5 Apr 2009 06:25:20 +0000 (06:25 +0000)
LICENSE MIT

replace the VOLSTAT online test with the PATH_AVAILABILITY
online test.  We do not care of the volume is offline on the file
server if the cache manager has current data to serve.

(cherry picked from commit 59945d1cb5f14baf9ab0008990079e1dde9a796d)

src/WINNT/tests/torture/Source/WinThreads.c

index 5ec893fc904b72e3fbb62475e1e94d2b37d9cdff..e0d77925da49b250da2bda1a5c184b0359ba80f8 100644 (file)
@@ -583,6 +583,7 @@ int IsOnline(char *strPath)
             blob.in_size = 0;
             blob.out_size = sizeof(space);
             blob.out = space;
+#if 0
             if (!(code = ppioctl(strPath, VIOCGETVOLSTAT, &blob, 1)))
             {
                 bret = WINTORTURE_ASFDLL_ONLINE;
@@ -590,6 +591,22 @@ int IsOnline(char *strPath)
                 if (!status->Online || !status->InService || !status->Blessed || status->NeedsSalvage)
                     bret = WINTORTURE_ASFDLL_OFFLINE;
             }
+#else
+            errno = 0;
+            code = ppioctl(strPath, VIOC_PATH_AVAILABILITY, &blob, 1);
+            if (!code) {
+                switch (errno) {
+                case ENXIO:
+                case ENOSYS:
+                case EBUSY:
+                    bret = WINTORTURE_ASFDLL_OFFLINE;
+                    break;
+                default:
+                    bret = WINTORTURE_ASFDLL_ONLINE;
+                    break;
+                }
+            }
+#endif 
         }
         else
             bret = WINTORTURE_ASFPIOCTL_NOTFOUND;