tst: winfsp-tests: delete_standby_test

This commit is contained in:
Bill Zissimopoulos 2017-02-11 10:07:03 -08:00
parent 0d95bb9b14
commit cf69d6a08d

View File

@ -683,10 +683,6 @@ static void delete_standby_dotest(ULONG Flags, PWSTR Prefix, ULONG FileInfoTimeo
ASSERT(!Success); ASSERT(!Success);
ASSERT(ERROR_FILE_NOT_FOUND == GetLastError()); ASSERT(ERROR_FILE_NOT_FOUND == GetLastError());
#if 0
/* disable test that fails with shares and passthrough file systems */
if (!OptShareName)
{
Success = CreateDirectoryW(Dir1Path, 0); Success = CreateDirectoryW(Dir1Path, 0);
ASSERT(Success); ASSERT(Success);
@ -699,8 +695,6 @@ static void delete_standby_dotest(ULONG Flags, PWSTR Prefix, ULONG FileInfoTimeo
Mapping0 = CreateFileMappingW(Handle, 0, PAGE_READWRITE, Mapping0 = CreateFileMappingW(Handle, 0, PAGE_READWRITE,
0, 16 * SystemInfo.dwAllocationGranularity, 0); 0, 16 * SystemInfo.dwAllocationGranularity, 0);
ASSERT(0 != Mapping0); ASSERT(0 != Mapping0);
Success = CloseHandle(Handle);
ASSERT(Success);
MappedView0 = MapViewOfFile(Mapping0, FILE_MAP_ALL_ACCESS, 0, 0, 0); MappedView0 = MapViewOfFile(Mapping0, FILE_MAP_ALL_ACCESS, 0, 0, 0);
ASSERT(0 != MappedView0); ASSERT(0 != MappedView0);
for (PUINT8 P = MappedView0, EndP = P + 16 * SystemInfo.dwAllocationGranularity; EndP > P; P++) for (PUINT8 P = MappedView0, EndP = P + 16 * SystemInfo.dwAllocationGranularity; EndP > P; P++)
@ -709,6 +703,8 @@ static void delete_standby_dotest(ULONG Flags, PWSTR Prefix, ULONG FileInfoTimeo
ASSERT(Success); ASSERT(Success);
Success = CloseHandle(Mapping0); Success = CloseHandle(Mapping0);
ASSERT(Success); ASSERT(Success);
Success = CloseHandle(Handle);
ASSERT(Success);
Handle = CreateFileW(File1Path, Handle = CreateFileW(File1Path,
GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, 0, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, 0,
@ -717,8 +713,6 @@ static void delete_standby_dotest(ULONG Flags, PWSTR Prefix, ULONG FileInfoTimeo
Mapping1 = CreateFileMappingW(Handle, 0, PAGE_READWRITE, Mapping1 = CreateFileMappingW(Handle, 0, PAGE_READWRITE,
0, 16 * SystemInfo.dwAllocationGranularity, 0); 0, 16 * SystemInfo.dwAllocationGranularity, 0);
ASSERT(0 != Mapping1); ASSERT(0 != Mapping1);
Success = CloseHandle(Handle);
ASSERT(Success);
MappedView1 = MapViewOfFile(Mapping1, FILE_MAP_ALL_ACCESS, 0, 0, 0); MappedView1 = MapViewOfFile(Mapping1, FILE_MAP_ALL_ACCESS, 0, 0, 0);
ASSERT(0 != MappedView1); ASSERT(0 != MappedView1);
for (PUINT8 P = MappedView1, EndP = P + 16 * SystemInfo.dwAllocationGranularity; EndP > P; P++) for (PUINT8 P = MappedView1, EndP = P + 16 * SystemInfo.dwAllocationGranularity; EndP > P; P++)
@ -727,6 +721,8 @@ static void delete_standby_dotest(ULONG Flags, PWSTR Prefix, ULONG FileInfoTimeo
ASSERT(Success); ASSERT(Success);
Success = CloseHandle(Mapping1); Success = CloseHandle(Mapping1);
ASSERT(Success); ASSERT(Success);
Success = CloseHandle(Handle);
ASSERT(Success);
Success = RemoveDirectoryW(Dir1Path); Success = RemoveDirectoryW(Dir1Path);
ASSERT(Success); ASSERT(Success);
@ -734,8 +730,6 @@ static void delete_standby_dotest(ULONG Flags, PWSTR Prefix, ULONG FileInfoTimeo
Success = RemoveDirectoryW(Dir1Path); Success = RemoveDirectoryW(Dir1Path);
ASSERT(!Success); ASSERT(!Success);
ASSERT(ERROR_FILE_NOT_FOUND == GetLastError()); ASSERT(ERROR_FILE_NOT_FOUND == GetLastError());
}
#endif
memfs_stop(memfs); memfs_stop(memfs);
} }