winfsp unit tests and fixes
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
This commit is contained in:
parent
f1f9e4547d
commit
fd16a55745
@ -81,6 +81,28 @@ TYPED_TEST(winfsp_test, info_can_get_basic_info) {
|
|||||||
|
|
||||||
::CloseHandle(handle);
|
::CloseHandle(handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TYPED_TEST(winfsp_test, info_can_get_standard_info) {
|
||||||
|
auto file_path{
|
||||||
|
utils::path::combine(this->mount_location, {"test_file_2"}),
|
||||||
|
};
|
||||||
|
auto handle =
|
||||||
|
::CreateFileA(file_path.c_str(), GENERIC_READ | GENERIC_WRITE,
|
||||||
|
FILE_SHARE_READ | FILE_SHARE_WRITE, 0, CREATE_NEW,
|
||||||
|
FILE_ATTRIBUTE_NORMAL | FILE_FLAG_DELETE_ON_CLOSE, 0);
|
||||||
|
ASSERT_NE(INVALID_HANDLE_VALUE, handle);
|
||||||
|
|
||||||
|
FILE_STANDARD_INFO std_info{};
|
||||||
|
EXPECT_TRUE(::GetFileInformationByHandleEx(handle, FileStandardInfo,
|
||||||
|
&std_info, sizeof std_info));
|
||||||
|
EXPECT_EQ(0, std_info.AllocationSize.QuadPart);
|
||||||
|
EXPECT_EQ(0, std_info.EndOfFile.QuadPart);
|
||||||
|
EXPECT_EQ(1, std_info.NumberOfLinks);
|
||||||
|
EXPECT_FALSE(std_info.DeletePending);
|
||||||
|
EXPECT_FALSE(std_info.Directory);
|
||||||
|
|
||||||
|
::CloseHandle(handle);
|
||||||
|
}
|
||||||
} // namespace repertory
|
} // namespace repertory
|
||||||
|
|
||||||
#endif // defined(_WIN32)
|
#endif // defined(_WIN32)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user