From 59945d1cb5f14baf9ab0008990079e1dde9a796d Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Sun, 5 Apr 2009 06:25:08 +0000 Subject: [PATCH] windows-tests-torture-20090405 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. --- src/WINNT/tests/torture/Source/WinThreads.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/WINNT/tests/torture/Source/WinThreads.c b/src/WINNT/tests/torture/Source/WinThreads.c index 5ec893fc9..e0d77925d 100644 --- a/src/WINNT/tests/torture/Source/WinThreads.c +++ b/src/WINNT/tests/torture/Source/WinThreads.c @@ -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; -- 2.39.5