From 3e0db6da07c460ad4851199501bc0b270049e91d Mon Sep 17 00:00:00 2001 From: Bill Zissimopoulos Date: Sun, 16 Oct 2016 13:30:48 -0700 Subject: [PATCH] tst: winfsp-tests: dirnotify_test changed to catch filename case problems --- tst/winfsp-tests/dirctl-test.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/tst/winfsp-tests/dirctl-test.c b/tst/winfsp-tests/dirctl-test.c index a8753a0f..e3d702ed 100644 --- a/tst/winfsp-tests/dirctl-test.c +++ b/tst/winfsp-tests/dirctl-test.c @@ -390,9 +390,12 @@ static void dirnotify_dotest(ULONG Flags, PWSTR Prefix, ULONG FileInfoTimeout, U DWORD BytesTransferred; PFILE_NOTIFY_INFORMATION NotifyInfo; - StringCbPrintfW(FilePath, sizeof FilePath, L"%s%s\\", + StringCbPrintfW(FilePath, sizeof FilePath, L"%s%s\\Directory", Prefix ? L"" : L"\\\\?\\GLOBALROOT", Prefix ? Prefix : memfs_volumename(memfs)); + Success = CreateDirectoryW(FilePath, 0); + ASSERT(Success); + NotifyInfo = malloc(4096); ASSERT(0 != NotifyInfo); @@ -401,7 +404,7 @@ static void dirnotify_dotest(ULONG Flags, PWSTR Prefix, ULONG FileInfoTimeout, U FILE_FLAG_BACKUP_SEMANTICS, 0); ASSERT(INVALID_HANDLE_VALUE != Handle); - StringCbPrintfW(FilePath, sizeof FilePath, L"%s%s\\file0", + StringCbPrintfW(FilePath, sizeof FilePath, L"%s%s\\Directory\\file0", Prefix ? L"" : L"\\\\?\\GLOBALROOT", Prefix ? Prefix : memfs_volumename(memfs)); Thread = (HANDLE)_beginthreadex(0, 0, dirnotify_dotest_thread, FilePath, 0, 0); @@ -440,6 +443,12 @@ static void dirnotify_dotest(ULONG Flags, PWSTR Prefix, ULONG FileInfoTimeout, U Success = CloseHandle(Handle); ASSERT(Success); + StringCbPrintfW(FilePath, sizeof FilePath, L"%s%s\\Directory", + Prefix ? L"" : L"\\\\?\\GLOBALROOT", Prefix ? Prefix : memfs_volumename(memfs)); + + Success = RemoveDirectoryW(FilePath); + ASSERT(Success); + free(NotifyInfo); memfs_stop(memfs);