winfsp unit tests and fixes
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good

This commit is contained in:
Scott E. Graves 2024-11-06 11:51:39 -06:00
parent 9da78b82f3
commit 9562ac2c62
4 changed files with 6 additions and 5 deletions

View File

@ -986,8 +986,6 @@ auto remote_server::winfsp_create(PWSTR file_name, UINT32 create_options,
{utils::string::to_utf8(file_name)}))
.exists());
std::cout << "ATTRIBUTES: " << std::hex << attributes << std::endl;
attributes |= FILE_FLAG_BACKUP_SEMANTICS;
if ((create_options & FILE_DIRECTORY_FILE) != 0U) {
attributes |= FILE_FLAG_POSIX_SEMANTICS;

View File

@ -129,8 +129,6 @@ auto remote_winfsp_drive::Create(PWSTR file_name, UINT32 create_options,
UINT64 allocation_size, PVOID * /*file_node*/,
PVOID *file_desc, OpenFileInfo *ofi)
-> NTSTATUS {
std::cout << "ATTRIBUTES: " << std::hex << attributes << std::endl;
remote::file_info fi{};
std::string normalized_name;
BOOLEAN exists = 0;

View File

@ -241,7 +241,6 @@ protected:
}
static void execute_unmount(auto args, auto location) {
std::this_thread::sleep_for(30s);
auto unmounted{false};
auto unmount_cmd =

View File

@ -119,6 +119,8 @@ TYPED_TEST(winfsp_test, cr8_attr_can_create_always_file_with_normal_attribute) {
auto attr = ::GetFileAttributesA(file_path.c_str());
EXPECT_EQ(FILE_ATTRIBUTE_ARCHIVE, attr);
EXPECT_TRUE(::DeleteFileA(file_path.c_str()));
}
TYPED_TEST(winfsp_test, cr8_attr_can_create_file_with_read_only_attribute) {
@ -136,6 +138,8 @@ TYPED_TEST(winfsp_test, cr8_attr_can_create_file_with_read_only_attribute) {
EXPECT_EQ(FILE_ATTRIBUTE_ARCHIVE | FILE_ATTRIBUTE_READONLY, attr);
EXPECT_TRUE(::SetFileAttributesA(file_path.c_str(), FILE_ATTRIBUTE_NORMAL));
EXPECT_TRUE(::DeleteFileA(file_path.c_str()));
}
// TYPED_TEST(winfsp_test,
@ -156,6 +160,8 @@ TYPED_TEST(winfsp_test, cr8_attr_can_create_file_with_read_only_attribute) {
//
// EXPECT_TRUE(::SetFileAttributesA(file_path.c_str(),
// FILE_ATTRIBUTE_NORMAL));
//
// EXPECT_TRUE(::DeleteFileA(file_path.c_str()));
// }
TYPED_TEST(winfsp_test, cr8_attr_can_create_always_file_with_hidden_attribute) {