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
9da78b82f3
commit
9562ac2c62
@ -986,8 +986,6 @@ auto remote_server::winfsp_create(PWSTR file_name, UINT32 create_options,
|
|||||||
{utils::string::to_utf8(file_name)}))
|
{utils::string::to_utf8(file_name)}))
|
||||||
.exists());
|
.exists());
|
||||||
|
|
||||||
std::cout << "ATTRIBUTES: " << std::hex << attributes << std::endl;
|
|
||||||
|
|
||||||
attributes |= FILE_FLAG_BACKUP_SEMANTICS;
|
attributes |= FILE_FLAG_BACKUP_SEMANTICS;
|
||||||
if ((create_options & FILE_DIRECTORY_FILE) != 0U) {
|
if ((create_options & FILE_DIRECTORY_FILE) != 0U) {
|
||||||
attributes |= FILE_FLAG_POSIX_SEMANTICS;
|
attributes |= FILE_FLAG_POSIX_SEMANTICS;
|
||||||
|
@ -129,8 +129,6 @@ auto remote_winfsp_drive::Create(PWSTR file_name, UINT32 create_options,
|
|||||||
UINT64 allocation_size, PVOID * /*file_node*/,
|
UINT64 allocation_size, PVOID * /*file_node*/,
|
||||||
PVOID *file_desc, OpenFileInfo *ofi)
|
PVOID *file_desc, OpenFileInfo *ofi)
|
||||||
-> NTSTATUS {
|
-> NTSTATUS {
|
||||||
std::cout << "ATTRIBUTES: " << std::hex << attributes << std::endl;
|
|
||||||
|
|
||||||
remote::file_info fi{};
|
remote::file_info fi{};
|
||||||
std::string normalized_name;
|
std::string normalized_name;
|
||||||
BOOLEAN exists = 0;
|
BOOLEAN exists = 0;
|
||||||
|
@ -241,7 +241,6 @@ protected:
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void execute_unmount(auto args, auto location) {
|
static void execute_unmount(auto args, auto location) {
|
||||||
std::this_thread::sleep_for(30s);
|
|
||||||
auto unmounted{false};
|
auto unmounted{false};
|
||||||
|
|
||||||
auto unmount_cmd =
|
auto unmount_cmd =
|
||||||
|
@ -119,6 +119,8 @@ TYPED_TEST(winfsp_test, cr8_attr_can_create_always_file_with_normal_attribute) {
|
|||||||
|
|
||||||
auto attr = ::GetFileAttributesA(file_path.c_str());
|
auto attr = ::GetFileAttributesA(file_path.c_str());
|
||||||
EXPECT_EQ(FILE_ATTRIBUTE_ARCHIVE, attr);
|
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) {
|
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_EQ(FILE_ATTRIBUTE_ARCHIVE | FILE_ATTRIBUTE_READONLY, attr);
|
||||||
|
|
||||||
EXPECT_TRUE(::SetFileAttributesA(file_path.c_str(), FILE_ATTRIBUTE_NORMAL));
|
EXPECT_TRUE(::SetFileAttributesA(file_path.c_str(), FILE_ATTRIBUTE_NORMAL));
|
||||||
|
|
||||||
|
EXPECT_TRUE(::DeleteFileA(file_path.c_str()));
|
||||||
}
|
}
|
||||||
|
|
||||||
// TYPED_TEST(winfsp_test,
|
// 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(),
|
// EXPECT_TRUE(::SetFileAttributesA(file_path.c_str(),
|
||||||
// FILE_ATTRIBUTE_NORMAL));
|
// FILE_ATTRIBUTE_NORMAL));
|
||||||
|
//
|
||||||
|
// EXPECT_TRUE(::DeleteFileA(file_path.c_str()));
|
||||||
// }
|
// }
|
||||||
|
|
||||||
TYPED_TEST(winfsp_test, cr8_attr_can_create_always_file_with_hidden_attribute) {
|
TYPED_TEST(winfsp_test, cr8_attr_can_create_always_file_with_hidden_attribute) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user