winfsp-tests: mount-test

This commit is contained in:
Bill Zissimopoulos
2015-11-30 15:35:40 -08:00
parent a318100d24
commit 0081596f8d
7 changed files with 39 additions and 26 deletions

View File

@ -5,16 +5,29 @@
void mount_dotest(PWSTR DeviceName)
{
NTSTATUS Result;
BOOLEAN Success;
FSP_FSCTL_VOLUME_PARAMS Params;
WCHAR VolumePath[MAX_PATH];
HANDLE VolumeHandle;
Params.SectorSize = 65536;
//Result = FspFsctlCreateVolume(DeviceName, &Params, );
Params.SectorSize = (UINT16)65536;
Result = FspFsctlCreateVolume(DeviceName, &Params, 0, VolumePath, sizeof VolumePath);
ASSERT(STATUS_SUCCESS == Result);
Result = FspFsctlOpenVolume(VolumePath, &VolumeHandle);
ASSERT(STATUS_SUCCESS == Result);
Result = FspFsctlDeleteVolume(VolumeHandle);
ASSERT(STATUS_SUCCESS == Result);
Success = CloseHandle(VolumeHandle);
ASSERT(Success);
}
void mount_test(void)
{
mount_dotest("WinFsp.Disk");
mount_dotest("WinFsp.Net");
mount_dotest(L"WinFsp.Disk");
//mount_dotest(L"WinFsp.Net");
}
void mount_tests(void)