fix
This commit is contained in:
parent
6f68f268c0
commit
7360b72c7b
@ -587,130 +587,116 @@ TEST(fuse_drive, all_tests) {
|
|||||||
std::this_thread::sleep_for(5s);
|
std::this_thread::sleep_for(5s);
|
||||||
EXPECT_EQ(0, system(("mount|grep \"" + mount_location + "\"").c_str()));
|
EXPECT_EQ(0, system(("mount|grep \"" + mount_location + "\"").c_str()));
|
||||||
|
|
||||||
// auto file_path = create_file_and_test(mount_location, "chmod_test");
|
auto file_path = create_file_and_test(mount_location, "chmod_test");
|
||||||
// test_chmod(utils::path::create_api_path("chmod_test"), file_path);
|
test_chmod(utils::path::create_api_path("chmod_test"), file_path);
|
||||||
// unlink_file_and_test(file_path);
|
unlink_file_and_test(file_path);
|
||||||
//
|
|
||||||
// file_path = create_file_and_test(mount_location, "chown_test");
|
|
||||||
// test_chown(utils::path::create_api_path("chown_test"), file_path);
|
|
||||||
// unlink_file_and_test(file_path);
|
|
||||||
//
|
|
||||||
// file_path = utils::path::combine(mount_location, {"mkdir_test"});
|
|
||||||
// test_mkdir(utils::path::create_api_path("mkdir_test"), file_path);
|
|
||||||
// rmdir_and_test(file_path);
|
|
||||||
//
|
|
||||||
// file_path = create_file_and_test(mount_location, "write_read_test");
|
|
||||||
// test_write_and_read(utils::path::create_api_path("write_read_test"),
|
|
||||||
// file_path);
|
|
||||||
// unlink_file_and_test(file_path);
|
|
||||||
//
|
|
||||||
// file_path =
|
|
||||||
// create_file_and_test(mount_location, "from_rename_file_test");
|
|
||||||
// auto to_file_path = utils::path::absolute(
|
|
||||||
// utils::path::combine(mount_location, {"to_rename_file_test"}));
|
|
||||||
// test_rename_file(file_path, to_file_path,
|
|
||||||
// provider_ptr->is_rename_supported());
|
|
||||||
// EXPECT_TRUE(utils::file::retry_delete_file(file_path));
|
|
||||||
// EXPECT_TRUE(utils::file::retry_delete_file(to_file_path));
|
|
||||||
//
|
|
||||||
// file_path = utils::path::absolute(
|
|
||||||
// utils::path::combine(mount_location, {"from_rename_dir_test"}));
|
|
||||||
// to_file_path = utils::path::absolute(
|
|
||||||
// utils::path::combine(mount_location, {"to_rename_dir_test"}));
|
|
||||||
// test_rename_directory(file_path, to_file_path,
|
|
||||||
// provider_ptr->is_rename_supported());
|
|
||||||
// EXPECT_TRUE(utils::file::retry_delete_directory(file_path.c_str()));
|
|
||||||
// EXPECT_TRUE(utils::file::retry_delete_directory(to_file_path.c_str()));
|
|
||||||
|
|
||||||
while (true) {
|
file_path = create_file_and_test(mount_location, "chown_test");
|
||||||
auto file_path =
|
test_chown(utils::path::create_api_path("chown_test"), file_path);
|
||||||
create_file_and_test(mount_location, "truncate_file_test");
|
unlink_file_and_test(file_path);
|
||||||
|
|
||||||
|
file_path = utils::path::combine(mount_location, {"mkdir_test"});
|
||||||
|
test_mkdir(utils::path::create_api_path("mkdir_test"), file_path);
|
||||||
|
rmdir_and_test(file_path);
|
||||||
|
|
||||||
|
file_path = create_file_and_test(mount_location, "write_read_test");
|
||||||
|
test_write_and_read(utils::path::create_api_path("write_read_test"),
|
||||||
|
file_path);
|
||||||
|
unlink_file_and_test(file_path);
|
||||||
|
|
||||||
|
file_path =
|
||||||
|
create_file_and_test(mount_location, "from_rename_file_test");
|
||||||
|
auto to_file_path = utils::path::absolute(
|
||||||
|
utils::path::combine(mount_location, {"to_rename_file_test"}));
|
||||||
|
test_rename_file(file_path, to_file_path,
|
||||||
|
provider_ptr->is_rename_supported());
|
||||||
|
EXPECT_TRUE(utils::file::retry_delete_file(file_path));
|
||||||
|
EXPECT_TRUE(utils::file::retry_delete_file(to_file_path));
|
||||||
|
|
||||||
|
file_path = utils::path::absolute(
|
||||||
|
utils::path::combine(mount_location, {"from_rename_dir_test"}));
|
||||||
|
to_file_path = utils::path::absolute(
|
||||||
|
utils::path::combine(mount_location, {"to_rename_dir_test"}));
|
||||||
|
test_rename_directory(file_path, to_file_path,
|
||||||
|
provider_ptr->is_rename_supported());
|
||||||
|
EXPECT_TRUE(utils::file::retry_delete_directory(file_path.c_str()));
|
||||||
|
EXPECT_TRUE(utils::file::retry_delete_directory(to_file_path.c_str()));
|
||||||
|
|
||||||
|
file_path = create_file_and_test(mount_location, "truncate_file_test");
|
||||||
test_truncate(file_path);
|
test_truncate(file_path);
|
||||||
unlink_file_and_test(file_path);
|
unlink_file_and_test(file_path);
|
||||||
}
|
|
||||||
|
|
||||||
// file_path = create_file_and_test(mount_location,
|
file_path = create_file_and_test(mount_location, "ftruncate_file_test");
|
||||||
// "ftruncate_file_test"); test_ftruncate(file_path);
|
test_ftruncate(file_path);
|
||||||
// unlink_file_and_test(file_path);
|
unlink_file_and_test(file_path);
|
||||||
//
|
|
||||||
// #ifndef __APPLE__
|
#ifndef __APPLE__
|
||||||
// file_path = create_file_and_test(mount_location,
|
file_path = create_file_and_test(mount_location, "fallocate_file_test");
|
||||||
// "fallocate_file_test");
|
test_fallocate(utils::path::create_api_path("fallocate_file_test"),
|
||||||
// test_fallocate(utils::path::create_api_path("fallocate_file_test"),
|
file_path);
|
||||||
// file_path);
|
unlink_file_and_test(file_path);
|
||||||
// unlink_file_and_test(file_path);
|
#endif
|
||||||
// #endif
|
|
||||||
//
|
file_path = create_file_and_test(mount_location, "write_fails_ro_test");
|
||||||
// file_path = create_file_and_test(mount_location,
|
test_write_operations_fail_if_read_only(
|
||||||
// "write_fails_ro_test");
|
utils::path::create_api_path("write_fails_ro_test"), file_path);
|
||||||
// test_write_operations_fail_if_read_only(
|
unlink_file_and_test(file_path);
|
||||||
// utils::path::create_api_path("write_fails_ro_test"),
|
|
||||||
// file_path);
|
file_path = create_file_and_test(mount_location, "getattr.txt");
|
||||||
// unlink_file_and_test(file_path);
|
test_file_getattr(utils::path::create_api_path("getattr.txt"),
|
||||||
//
|
file_path);
|
||||||
// file_path = create_file_and_test(mount_location,
|
unlink_file_and_test(file_path);
|
||||||
// "getattr.txt");
|
|
||||||
// test_file_getattr(utils::path::create_api_path("getattr.txt"),
|
file_path = utils::path::combine(mount_location, {"getattr_dir"});
|
||||||
// file_path);
|
test_directory_getattr(utils::path::create_api_path("getattr_dir"),
|
||||||
// unlink_file_and_test(file_path);
|
file_path);
|
||||||
//
|
rmdir_and_test(file_path);
|
||||||
// file_path = utils::path::combine(mount_location,
|
|
||||||
// {"getattr_dir"});
|
#if !__APPLE__ && HAS_SETXATTR
|
||||||
// test_directory_getattr(utils::path::create_api_path("getattr_dir"),
|
file_path =
|
||||||
// file_path);
|
create_file_and_test(mount_location, "xattr_invalid_names_test");
|
||||||
// rmdir_and_test(file_path);
|
test_xattr_invalid_parameters(file_path);
|
||||||
//
|
unlink_file_and_test(file_path);
|
||||||
// #if !__APPLE__ && HAS_SETXATTR
|
|
||||||
// file_path =
|
file_path =
|
||||||
// create_file_and_test(mount_location,
|
create_file_and_test(mount_location, "xattr_create_get_test");
|
||||||
// "xattr_invalid_names_test");
|
test_xattr_create_and_get(file_path);
|
||||||
// test_xattr_invalid_parameters(file_path);
|
unlink_file_and_test(file_path);
|
||||||
// unlink_file_and_test(file_path);
|
|
||||||
//
|
file_path =
|
||||||
// file_path =
|
create_file_and_test(mount_location, "xattr_listxattr_test");
|
||||||
// create_file_and_test(mount_location,
|
test_xattr_listxattr(file_path);
|
||||||
// "xattr_create_get_test");
|
unlink_file_and_test(file_path);
|
||||||
// test_xattr_create_and_get(file_path);
|
|
||||||
// unlink_file_and_test(file_path);
|
file_path = create_file_and_test(mount_location, "xattr_replace_test");
|
||||||
//
|
test_xattr_replace(file_path);
|
||||||
// file_path =
|
unlink_file_and_test(file_path);
|
||||||
// create_file_and_test(mount_location,
|
|
||||||
// "xattr_listxattr_test");
|
file_path =
|
||||||
// test_xattr_listxattr(file_path);
|
create_file_and_test(mount_location, "xattr_default_create_test");
|
||||||
// unlink_file_and_test(file_path);
|
test_xattr_default_create(file_path);
|
||||||
//
|
unlink_file_and_test(file_path);
|
||||||
// file_path = create_file_and_test(mount_location,
|
|
||||||
// "xattr_replace_test"); test_xattr_replace(file_path);
|
file_path =
|
||||||
// unlink_file_and_test(file_path);
|
create_file_and_test(mount_location, "xattr_default_replace_test");
|
||||||
//
|
test_xattr_default_replace(file_path);
|
||||||
// file_path =
|
unlink_file_and_test(file_path);
|
||||||
// create_file_and_test(mount_location,
|
|
||||||
// "xattr_default_create_test");
|
file_path = create_file_and_test(mount_location,
|
||||||
// test_xattr_default_create(file_path);
|
"xattr_create_fails_exists_test");
|
||||||
// unlink_file_and_test(file_path);
|
test_xattr_create_fails_if_exists(file_path);
|
||||||
//
|
unlink_file_and_test(file_path);
|
||||||
// file_path =
|
|
||||||
// create_file_and_test(mount_location,
|
file_path = create_file_and_test(mount_location,
|
||||||
// "xattr_default_replace_test");
|
"xattr_create_fails_not_exists_test");
|
||||||
// test_xattr_default_replace(file_path);
|
test_xattr_create_fails_if_not_exists(file_path);
|
||||||
// unlink_file_and_test(file_path);
|
unlink_file_and_test(file_path);
|
||||||
//
|
|
||||||
// file_path = create_file_and_test(mount_location,
|
file_path =
|
||||||
// "xattr_create_fails_exists_test");
|
create_file_and_test(mount_location, "xattr_removexattr_test");
|
||||||
// test_xattr_create_fails_if_exists(file_path);
|
test_xattr_removexattr(file_path);
|
||||||
// unlink_file_and_test(file_path);
|
unlink_file_and_test(file_path);
|
||||||
//
|
#endif
|
||||||
// file_path = create_file_and_test(mount_location,
|
|
||||||
// "xattr_create_fails_not_exists_test");
|
|
||||||
// test_xattr_create_fails_if_not_exists(file_path);
|
|
||||||
// unlink_file_and_test(file_path);
|
|
||||||
//
|
|
||||||
// file_path =
|
|
||||||
// create_file_and_test(mount_location,
|
|
||||||
// "xattr_removexattr_test");
|
|
||||||
// test_xattr_removexattr(file_path);
|
|
||||||
// unlink_file_and_test(file_path);
|
|
||||||
// #endif
|
|
||||||
|
|
||||||
execute_unmount(mount_location);
|
execute_unmount(mount_location);
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user