winfsp-tests: getvolinfo_test

This commit is contained in:
Bill Zissimopoulos 2016-01-25 17:58:22 -08:00
parent 96c1e786f4
commit a01e119ec3

View File

@ -149,6 +149,13 @@ void getvolinfo_dotest(ULONG Flags, PWSTR Prefix, ULONG FileInfoTimeout)
DWORD MaxComponentLength;
DWORD FileSystemFlags;
WCHAR FileSystemNameBuf[MAX_PATH];
DWORD SectorsPerCluster;
DWORD BytesPerSector;
DWORD FreeClusters;
DWORD TotalClusters;
ULARGE_INTEGER CallerFreeBytes;
ULARGE_INTEGER TotalBytes;
ULARGE_INTEGER FreeBytes;
StringCbPrintfW(FilePath, sizeof FilePath, L"%s%s\\",
Prefix ? L"" : L"\\\\?\\GLOBALROOT", Prefix ? Prefix : memfs_volumename(memfs));
@ -167,6 +174,12 @@ void getvolinfo_dotest(ULONG Flags, PWSTR Prefix, ULONG FileInfoTimeout)
ASSERT(0 == wcscmp(FileSystemNameBuf, L"WinFsp"));
}
Success = GetDiskFreeSpaceW(FilePath, &SectorsPerCluster, &BytesPerSector, &FreeClusters, &TotalClusters);
ASSERT(Success);
Success = GetDiskFreeSpaceExW(FilePath, &CallerFreeBytes, &TotalBytes, &FreeBytes);
ASSERT(Success);
memfs_stop(memfs);
}