debugging
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good

This commit is contained in:
Scott E. Graves 2024-11-08 05:55:52 -06:00
parent ae5c4a11a8
commit af339e6086
2 changed files with 9 additions and 10 deletions

View File

@ -923,7 +923,7 @@ auto remote_server::winfsp_can_delete(PVOID file_desc, PWSTR /*file_name*/)
auto ret = has_open_info(handle, STATUS_INVALID_HANDLE);
if (ret == STATUS_SUCCESS) {
FILE_DISPOSITION_INFO dispositionInfo = {TRUE};
FILE_DISPOSITION_INFO dispositionInfo{TRUE};
ret = ::SetFileInformationByHandle(handle, FileDispositionInfo,
&dispositionInfo,
sizeof(FILE_DISPOSITION_INFO)) != 0

View File

@ -192,13 +192,12 @@ TYPED_TEST(winfsp_test, delete_can_delete_after_mapping) {
EXPECT_TRUE(::CloseHandle(mapping));
}
EXPECT_TRUE(::DeleteFileA(file_path.c_str()));
EXPECT_TRUE(::DeleteFileA(file_path2.c_str()));
std::this_thread::sleep_for(2s);
ASSERT_TRUE(::DeleteFileA(file_path.c_str()));
ASSERT_TRUE(::DeleteFileA(file_path2.c_str()));
EXPECT_TRUE(::RemoveDirectoryA(dir_path.c_str()));
EXPECT_FALSE(::RemoveDirectoryA(dir_path.c_str()));
EXPECT_EQ(ERROR_FILE_NOT_FOUND, ::GetLastError());
ASSERT_TRUE(::RemoveDirectoryA(dir_path.c_str()));
ASSERT_FALSE(::RemoveDirectoryA(dir_path.c_str()));
ASSERT_EQ(ERROR_FILE_NOT_FOUND, ::GetLastError());
}
TYPED_TEST(winfsp_test, delete_can_delete_on_close_after_mapping) {
@ -271,9 +270,9 @@ TYPED_TEST(winfsp_test, delete_can_delete_on_close_after_mapping) {
EXPECT_TRUE(::CloseHandle(handle));
}
EXPECT_TRUE(::RemoveDirectoryA(dir_path.c_str()));
EXPECT_FALSE(::RemoveDirectoryA(dir_path.c_str()));
EXPECT_EQ(ERROR_FILE_NOT_FOUND, ::GetLastError());
ASSERT_TRUE(::RemoveDirectoryA(dir_path.c_str()));
ASSERT_FALSE(::RemoveDirectoryA(dir_path.c_str()));
ASSERT_EQ(ERROR_FILE_NOT_FOUND, ::GetLastError());
}
} // namespace repertory