winfsp unit tests and fixes

This commit is contained in:
Scott E. Graves 2024-11-07 09:21:00 -06:00
parent 0903d4b83e
commit c16d9f9712

View File

@ -104,9 +104,12 @@ TYPED_TEST(winfsp_test, delete_can_handle_mmap_after_file_deletion) {
FILE_ATTRIBUTE_NORMAL | FILE_FLAG_DELETE_ON_CLOSE, nullptr);
ASSERT_NE(INVALID_HANDLE_VALUE, handle);
SYSTEM_INFO sys_info{};
::GetSystemInfo(&sys_info);
auto *mapping =
::CreateFileMappingA(handle, nullptr, PAGE_READWRITE, 0,
SystemInfo.dwAllocationGranularity, nullptr);
sys_info.dwAllocationGranularity, nullptr);
EXPECT_TRUE(mapping != nullptr);
EXPECT_TRUE(::CloseHandle(handle));